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

Method exec

hyperagent-ext/media/scripts/highlight.min.js:142–148  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

140 n.compile(),this.multiRegexes[e]=n,n}resumingScanAtSamePosition(){
141 return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,n){
142 this.rules.push([e,n]),"begin"===n.type&&this.count++}exec(e){
143 const n=this.getMatcher(this.regexIndex);n.lastIndex=this.lastIndex
144 ;let t=n.exec(e)
145 ;if(this.resumingScanAtSamePosition())if(t&&t.index===this.lastIndex);else{
146 const n=this.getMatcher(0);n.lastIndex=this.lastIndex+1,t=n.exec(e)}
147 return t&&(this.regexIndex+=t.position+1,
148 this.regexIndex===this.count&&this.considerAll()),t}}
149 if(e.compilerExtensions||(e.compilerExtensions=[]),
150 e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.")
151 ;return e.classNameAliases=i(e.classNameAliases||{}),function t(r,s){const o=r

Callers

nothing calls this directly

Calls 4

getMatcherMethod · 0.95
considerAllMethod · 0.95
execMethod · 0.45

Tested by

no test coverage detected