MCPcopy
hub / github.com/antlr/antlr4 / enterRule

Method enterRule

runtime/JavaScript/src/antlr4/Parser.js:380–388  ·  view source on GitHub ↗

* Always called by generated parsers upon entry to a rule. Access field * //_ctx get the current context.

(localctx, state, ruleIndex)

Source from the content-addressed store, hash-verified

378 * {@link //_ctx} get the current context.
379 */
380 enterRule(localctx, state, ruleIndex) {
381 this.state = state;
382 this._ctx = localctx;
383 this._ctx.start = this._input.LT(1);
384 if (this.buildParseTrees) {
385 this.addContextToParseTree();
386 }
387 this.triggerEnterRuleEvent();
388 }
389
390 exitRule() {
391 this._ctx.stop = this._input.LT(-1);

Callers 1

triggerEnterRuleEventMethod · 0.45

Calls 3

addContextToParseTreeMethod · 0.95
triggerEnterRuleEventMethod · 0.95
LTMethod · 0.65

Tested by

no test coverage detected