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

Method getMatcher

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

Source from the content-addressed store, hash-verified

136 ;return t.splice(0,n),Object.assign(t,i)}}class s{constructor(){
137 this.rules=[],this.multiRegexes=[],
138 this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){
139 if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n
140 ;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),
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

Callers 1

execMethod · 0.95

Calls 2

addRuleMethod · 0.95
compileMethod · 0.95

Tested by

no test coverage detected