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

Method compile

vulnerablecode/static/js/highlight-10.6.0.min.js:90–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88addRule(e,t){
89t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),
90this.matchAt+=(e=>RegExp(e.toString()+"|").exec("").length-1)(e)+1}compile(){
910===this.regexes.length&&(this.exec=()=>null)
92;const e=this.regexes.map((e=>e[1]));this.matcherRe=n(((e,t="|")=>{
93const n=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;let s=0,r=""
94;for(let a=0;a<e.length;a++){s+=1;const i=s;let o=u(e[a])
95;for(a>0&&(r+=t),r+="(";o.length>0;){const e=n.exec(o);if(null==e){r+=o;break}
96r+=o.substring(0,e.index),
97o=o.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+(Number(e[1])+i):(r+=e[0],
98"("===e[0]&&s++)}r+=")"}return r})(e),!0),this.lastIndex=0}exec(e){
99this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e)
100;if(!t)return null
101;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),s=this.matchIndexes[n]

Callers 15

getMatcherMethod · 0.95
utils.pyFile · 0.80
from_nameFunction · 0.80
normalize_linksFunction · 0.80
get_inferencesMethod · 0.80
parse_tomcat_securityFunction · 0.80
vuln_id_from_descMethod · 0.80
istio_importer.pyFile · 0.80
vuln_id_from_descMethod · 0.80

Calls 3

nFunction · 0.85
uFunction · 0.85
execMethod · 0.45

Tested by

no test coverage detected