MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / exec

Method exec

pages/viewScriptSource/libs/highlight.min.js:142–148  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

140t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){
141return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){
142this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){
143const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex
144;let n=t.exec(e)
145;if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{
146const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}
147return n&&(this.regexIndex+=n.position+1,
148this.regexIndex===this.count&&this.considerAll()),n}}
149if(e.compilerExtensions||(e.compilerExtensions=[]),
150e.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=r(e.classNameAliases||{}),function n(s,o){const a=s

Callers

nothing calls this directly

Calls 4

getMatcherMethod · 0.95
considerAllMethod · 0.95
execMethod · 0.45

Tested by

no test coverage detected