Package org.antlr.v4.codegen.model
Class CodeBlockForOuterMostAlt
- java.lang.Object
-
- org.antlr.v4.codegen.model.OutputModelObject
-
- org.antlr.v4.codegen.model.SrcOp
-
- org.antlr.v4.codegen.model.decl.CodeBlock
-
- org.antlr.v4.codegen.model.CodeBlockForAlt
-
- org.antlr.v4.codegen.model.CodeBlockForOuterMostAlt
-
public class CodeBlockForOuterMostAlt extends CodeBlockForAlt
The code associated with the outermost alternative of a rule. Sometimes we might want to treat them differently in the code generation.
-
-
Field Summary
Fields Modifier and Type Field Description Alternative
alt
The alternative.String
altLabel
The label for the alternative; or null if the alternative is not labeled.-
Fields inherited from class org.antlr.v4.codegen.model.decl.CodeBlock
codeBlockLevel, locals, ops, preamble, treeLevel
-
Fields inherited from class org.antlr.v4.codegen.model.SrcOp
enclosingBlock, enclosingRuleRunction, uniqueID
-
Fields inherited from class org.antlr.v4.codegen.model.OutputModelObject
ast, factory
-
-
Constructor Summary
Constructors Constructor Description CodeBlockForOuterMostAlt(OutputModelFactory factory, Alternative alt)
-
Method Summary
-
Methods inherited from class org.antlr.v4.codegen.model.decl.CodeBlock
addLocalDecl, addOp, addOps, addPreambleOp, insertOp
-
Methods inherited from class org.antlr.v4.codegen.model.SrcOp
getContextName, getOuterMostAltCodeBlock
-
-
-
-
Field Detail
-
altLabel
public String altLabel
The label for the alternative; or null if the alternative is not labeled.
-
alt
public Alternative alt
The alternative.
-
-
Constructor Detail
-
CodeBlockForOuterMostAlt
public CodeBlockForOuterMostAlt(OutputModelFactory factory, Alternative alt)
-
-