Package org.antlr.v4.codegen.model
Class SrcOp
java.lang.Object
org.antlr.v4.codegen.model.OutputModelObject
org.antlr.v4.codegen.model.SrcOp
- Direct Known Subclasses:
AddToLabelList
,CaptureNextToken
,CaptureNextTokenType
,CodeBlock
,Decl
,ExceptionClause
,RuleElement
,Sync
,TestSetInline
,ThrowRecognitionException
-
Field Summary
FieldsModifier and TypeFieldDescriptionAll operations know in which block they live: CodeBlock, CodeBlockForAlt Templates might need to know block nesting level or find a specific declaration, etc...int
Used to create unique var names etc...Fields inherited from class org.antlr.v4.codegen.model.OutputModelObject
ast, factory
-
Constructor Summary
ConstructorsConstructorDescriptionSrcOp
(OutputModelFactory factory) SrcOp
(OutputModelFactory factory, GrammarAST ast) -
Method Summary
Modifier and TypeMethodDescriptionReturn label alt or return name of ruleWalk upwards in model tree, looking for outer alt's code block
-
Field Details
-
uniqueID
public int uniqueIDUsed to create unique var names etc... -
enclosingBlock
All operations know in which block they live: CodeBlock, CodeBlockForAlt Templates might need to know block nesting level or find a specific declaration, etc... -
enclosingRuleRunction
-
-
Constructor Details
-
SrcOp
-
SrcOp
-
-
Method Details
-
getOuterMostAltCodeBlock
Walk upwards in model tree, looking for outer alt's code block -
getContextName
Return label alt or return name of rule
-