public class InterpreterRuleContext extends ParserRuleContext
ParserRuleContext by allowing the value of
getRuleIndex() to be explicitly set for the context.
ParserRuleContext does not include field storage for the rule index
since the context classes created by the code generator override the
getRuleIndex() method to return the correct value for that context.
Since the parser interpreter does not use the context classes generated for a
parser, this class (with slightly more memory overhead per node) is used to
provide equivalent functionality.
children, exception, start, stopinvokingState, parent| 构造器和说明 |
|---|
InterpreterRuleContext(ParserRuleContext parent,
int invokingStateNumber,
int ruleIndex)
Constructs a new
InterpreterRuleContext with the specified
parent, invoking state, and rule index. |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getRuleIndex() |
addAnyChild, addChild, addChild, addChild, addErrorNode, addErrorNode, copyFrom, emptyContext, enterRule, exitRule, getChild, getChild, getChildCount, getParent, getRuleContext, getRuleContexts, getSourceInterval, getStart, getStop, getToken, getTokens, removeLastChild, toInfoStringaccept, depth, getAltNumber, getChildContext, getPayload, getRuleContext, getText, isEmpty, setAltNumber, setParent, toString, toString, toString, toString, toString, toStringTree, toStringTree, toStringTreepublic InterpreterRuleContext(@Nullable
ParserRuleContext parent,
int invokingStateNumber,
int ruleIndex)
InterpreterRuleContext with the specified
parent, invoking state, and rule index.parent - The parent context.invokingStateNumber - The invoking state number.ruleIndex - The rule index for the current context.public int getRuleIndex()
getRuleIndex 在类中 RuleContextCopyright © 1992–2022 Daniel Sun. All rights reserved.