MCPcopy Index your code
hub / github.com/idank/explainshell / exec

Method exec

explainshell/web/static/js/highlight.min.js:143–149  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

getMatcherMethod · 0.95
considerAllMethod · 0.95
execMethod · 0.45

Tested by

no test coverage detected