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

Method compile

explainshell/web/static/js/highlight.min.js:131–133  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

129 addRule(e,t){
130 t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),
131 this.matchAt+=p(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null)
132 ;const e=this.regexes.map((e=>e[1]));this.matcherRe=t(m(e,{joinWith:"|"
133 }),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex
134 ;const t=this.matcherRe.exec(e);if(!t)return null
135 ;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),i=this.matchIndexes[n]
136 ;return t.splice(0,n),Object.assign(t,i)}}class s{constructor(){

Callers 7

getMatcherMethod · 0.95
fetch_manned.pyFile · 0.80
roff_utils.pyFile · 0.80
manpage.pyFile · 0.80
store.pyFile · 0.80
render_eval.pyFile · 0.80

Calls 2

tFunction · 0.70
mFunction · 0.70

Tested by

no test coverage detected