(t)
| 138 | https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch(i){throw n}throw n}}optionInternalRecord(e,r){return wa.call(this,he,e,r)}atLeastOneInternalRecord(e,r){wa.call(this,Ae,r,e)}atLeastOneSepFirstInternalRecord(e,r){wa.call(this,$e,r,e,ug)}manyInternalRecord(e,r){wa.call(this,se,r,e)}manySepFirstInternalRecord(e,r){wa.call(this,Re,r,e,ug)}orInternalRecord(e,r){return BE.call(this,e,r)}subruleInternalRecord(e,r,n){if(jc(r),!e||q(e,"ruleName")===!1){let o=new Error(`<SUBRULE${dg(r)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> |
| 139 | inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}let i=gr(this.recordingProdStack),s=e.ruleName,a=new pe({idx:r,nonTerminalName:s,label:n?.LABEL,referencedRule:void 0});return i.definition.push(a),this.outputCst?jE:Bc}consumeInternalRecord(e,r,n){if(jc(r),!hf(e)){let a=new Error(`<CONSUME${dg(r)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> |
| 140 | inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}let i=gr(this.recordingProdStack),s=new te({idx:r,terminalType:e,label:n?.LABEL});return i.definition.push(s),hg}};function wa(t,e,r,n=!1){jc(r);let i=gr(this.recordingProdStack),s=mr(e)?e:e.DEF,a=new t({definition:[],idx:r});return n&&(a.separator=e.SEP),q(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(a),s.call(this),i.definition.push(a),this.recordingProdStack.pop(),Bc}function BE(t,e){jc(e);let r=gr(this.recordingProdStack),n=Ze(t)===!1,i=n===!1?t:t.DEF,s=new xe({definition:[],idx:e,ignoreAmbiguities:n&&t.IGNORE_AMBIGUITIES===!0});q(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD);let a=Mo(i,o=>mr(o.GATE));return s.hasPredicates=a,r.definition.push(s),D(i,o=>{let c=new Ee({definition:[]});s.definition.push(c),q(o,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=o.IGNORE_AMBIGUITIES:q(o,"GATE")&&(c.ignoreAmbiguities=!0),this.recordingProdStack.push(c),o.ALT.call(this),this.recordingProdStack.pop()}),Bc}function dg(t){return t===0?"":`${t}`}function jc(t){if(t<0||t>fg){let e=new Error(`Invalid DSL Method idx value: <${t}> |
| 141 | Idx value must be a none negative value smaller than ${fg+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}var Wc=class{initPerformanceTracer(e){if(q(e,"traceInitPerf")){let r=e.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=wt.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${e}>`);let{time:i,value:s}=ga(r),a=i>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(`${n}<-- <${e}> time: ${i}ms`),this.traceInitIndent--,s}else return r()}};function mg(t,e){e.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(i=>{if(i==="constructor")return;let s=Object.getOwnPropertyDescriptor(n,i);s&&(s.get||s.set)?Object.defineProperty(t.prototype,i,s):t.prototype[i]=r.prototype[i]})})}var Hi=Kr(Bt,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Hi);var wt=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Hr,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Yi=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0}),it=(function(t){return t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION",t})(it||{});function Vc(t=void 0){return function(){return t}}var gg=(()=>{class t{static performSelfAnalysis(r){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let r;this.selfAnalysisDone=!0;let n=this.className;this.TRACE_INIT("toFastProps",()=>{ya(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),D(this.definedRulesNames,s=>{let o=this[s].originalGrammarAction,c;this.TRACE_INIT(`${s} Rule`,()=>{c=this.topLevelRuleRecord(s,o)}),this.gastProductionsCache[s]=c})}finally{this.disableRecording()}});let i=[];if(this.TRACE_INIT("Grammar Resolving",()=>{i=Qm({rules:Ce(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(i)}),this.TRACE_INIT("Grammar Validations",()=>{if(Z(i)&&this.skipValidations===!1){let s=Zm({rules:Ce(this.gastProductionsCache),tokenTypes:Ce(this.tokensMap),errMsgProvider:cr,grammarName:n}),a=Wm({lookaheadStrategy:this.lookaheadStrategy,rules:Ce(this.gastProductionsCache),tokenTypes:Ce(this.tokensMap),grammarName:n});this.definitionErrors=this.definitionErrors.concat(s,a)}}),Z(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let s=om(Ce(this.gastProductionsCache));this.resyncFollows=s}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var s,a;(a=(s=this.lookaheadStrategy).initialize)===null||a===void 0||a.call(s,{rules:Ce(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Ce(this.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!Z(this.definitionErrors))throw r=I(this.definitionErrors,s=>s.message),new Error(`Parser Definition Errors detected: |
| 142 | ${r.join(` |
| 143 | ------------------------------- |
| 144 | `)}`)})}constructor(r,n){this.definitionErrors=[],this.selfAnalysisDone=!1;let i=this;if(i.initErrorHandler(n),i.initLexerAdapter(),i.initLooksAhead(n),i.initRecognizerEngine(r,n),i.initRecoverable(n),i.initTreeBuilder(n),i.initContentAssist(),i.initGastRecorder(n),i.initPerformanceTracer(n),q(n,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated. |
no outgoing calls
no test coverage detected