MCPcopy Create free account
hub / github.com/celtera/libremidi / w

Function w

book/theme/highlight.js:223–237  ·  view source on GitHub ↗
(a,r)

Source from the content-addressed store, hash-verified

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

Callers 3

fFunction · 0.85
NFunction · 0.85
vFunction · 0.85

Calls 5

dFunction · 0.85
_Function · 0.85
bFunction · 0.85
hFunction · 0.85
nFunction · 0.70

Tested by

no test coverage detected