MCPcopy Create free account
hub / github.com/FSoft-AI4Code/HyperAgent / y

Function y

hyperagent-ext/media/scripts/highlight.min.js:220–234  ·  view source on GitHub ↗
(a,r)

Source from the content-addressed store, hash-verified

218 k.scope&&M.closeNode(),k.skip||k.subLanguage||(A+=k.relevance),k=k.parent
219 }while(k!==i.parent);return i.starts&&b(i.starts,e),r.returnEnd?0:t.length}
220 let h={};function y(a,r){const o=r&&r[0];if(S+=a,null==o)return g(),0
221 ;if("begin"===h.type&&"end"===r.type&&h.index===r.index&&""===o){
222 if(S+=n.slice(r.index,r.index+1),!s){const n=Error(`0 width match regex (${e})`)
223 ;throw n.languageName=e,n.badRule=h.rule,n}return 1}
224 if(h=r,"begin"===r.type)return(e=>{
225 const n=e[0],a=e.rule,i=new t(a),r=[a.__beforeBegin,a["on:begin"]]
226 ;for(const t of r)if(t&&(t(e,i),i.isMatchIgnored))return p(n)
227 ;return a.skip?S+=n:(a.excludeBegin&&(S+=n),
228 g(),a.returnBegin||a.excludeBegin||(S=n)),b(a,e),a.returnBegin?0:n.length})(r)
229 ;if("illegal"===r.type&&!i){
230 const e=Error('Illegal lexeme "'+o+'" for mode "'+(k.scope||"<unnamed>")+'"')
231 ;throw e.mode=k,e}if("end"===r.type){const e=_(r);if(e!==ee)return e}
232 if("illegal"===r.type&&""===o)return 1
233 ;if(T>1e5&&T>3*r.index)throw Error("potential infinite loop, way more iterations than matches")
234 ;return S+=o,o.length}const w=v(e)
235 ;if(!w)throw K(o.replace("{}",e)),Error('Unknown language: "'+e+'"')
236 ;const N=Q(w);let O="",k=r||N;const x={},M=new d.__emitter(d);(()=>{const e=[]
237 ;for(let n=k;n!==w;n=n.parent)n.scope&&e.unshift(n.scope)

Callers 4

fFunction · 0.70
highlight.min.jsFile · 0.70
wFunction · 0.70
NFunction · 0.70

Calls 15

ErrorClass · 0.85
replaceMethod · 0.80
warnMethod · 0.80
gFunction · 0.70
tClass · 0.70
pFunction · 0.70
bFunction · 0.70
_Function · 0.70
vFunction · 0.70
HFunction · 0.70
xFunction · 0.70
hFunction · 0.70

Tested by

no test coverage detected