MCPcopy Create free account
hub / github.com/danvk/webdiff / C

Function C

webdiff/static/js/highlight.min.js:221–235  ·  view source on GitHub ↗
(n,i)

Source from the content-addressed store, hash-verified

219h.scope&&A.closeNode(),h.skip||h.subLanguage||(y+=h.relevance),h=h.parent
220}while(h!==r.parent);return r.starts&&p(r.starts,e),i.returnEnd?0:a.length}
221let S={};function C(n,i){const o=i&&i[0];if(v+=n,null==o)return d(),0
222;if("begin"===S.type&&"end"===i.type&&S.index===i.index&&""===o){
223if(v+=t.slice(i.index,i.index+1),!s){const t=Error(`0 width match regex (${e})`)
224;throw t.languageName=e,t.badRule=S.rule,t}return 1}
225if(S=i,"begin"===i.type)return(e=>{
226const t=e[0],n=e.rule,r=new a(n),i=[n.__beforeBegin,n["on:begin"]]
227;for(const a of i)if(a&&(a(e,r),r.isMatchIgnored))return E(t)
228;return n.skip?v+=t:(n.excludeBegin&&(v+=t),
229d(),n.returnBegin||n.excludeBegin||(v=t)),p(n,e),n.returnBegin?0:t.length})(i)
230;if("illegal"===i.type&&!r){
231const e=Error('Illegal lexeme "'+o+'" for mode "'+(h.scope||"<unnamed>")+'"')
232;throw e.mode=h,e}if("end"===i.type){const e=g(i);if(e!==te)return e}
233if("illegal"===i.type&&""===o)return 1
234;if(M>1e5&&M>3*i.index)throw Error("potential infinite loop, way more iterations than matches")
235;return v+=o,o.length}const R=O(e)
236;if(!R)throw q(o.replace("{}",e)),Error('Unknown language: "'+e+'"')
237;const N=j(R);let f="",h=i||N;const I={},A=new c.__emitter(c);(()=>{const e=[]
238;for(let t=h;t!==R;t=t.parent)t.scope&&e.unshift(t.scope)

Callers 4

TFunction · 0.70
highlight.min.jsFile · 0.70
RFunction · 0.70
NFunction · 0.70

Calls 12

aClass · 0.85
zFunction · 0.85
dFunction · 0.70
EFunction · 0.70
pFunction · 0.70
gFunction · 0.70
OFunction · 0.70
IFunction · 0.70
SFunction · 0.70
bFunction · 0.70
execMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected