MCPcopy Create free account
hub / github.com/aboutcode-org/vulnerablecode / getMatcher

Method getMatcher

vulnerablecode/static/js/highlight-10.6.0.min.js:104–107  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

102;return t.splice(0,n),Object.assign(t,s)}}class r{constructor(){
103this.rules=[],this.multiRegexes=[],
104this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){
105if(this.multiRegexes[e])return this.multiRegexes[e];const t=new s
106;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),
107t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){
108return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){
109this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){
110const 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