Class Nodes.CaseNode
java.lang.Object
org.prism.Nodes.Node
org.prism.Nodes.CaseNode
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Nodes.WhenNode[]Represents the conditions of the case statement.final Nodes.ElseNodeRepresents the else clause of the case statement.final Nodes.NodeRepresents the predicate of the case statement.Fields inherited from class org.prism.Nodes.Node
EMPTY_ARRAY, length, startOffset -
Constructor Summary
ConstructorsConstructorDescriptionCaseNode(int startOffset, int length, Nodes.Node predicate, Nodes.WhenNode[] conditions, Nodes.ElseNode else_clause) -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(AbstractNodeVisitor<T> visitor) protected String<T> voidvisitChildNodes(AbstractNodeVisitor<T> visitor) Methods inherited from class org.prism.Nodes.Node
endOffset, hasNewLineFlag, setNewLineFlag, setNewLineFlag, toString
-
Field Details
-
predicate
Represents the predicate of the case statement. This can be either `nil` or any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). case true; when false; end ^^^^ -
conditions
Represents the conditions of the case statement. case true; when false; end ^^^^^^^^^^ -
else_clause
Represents the else clause of the case statement. case true; when false; else; end ^^^^
-
-
Constructor Details
-
CaseNode
public CaseNode(int startOffset, int length, Nodes.Node predicate, Nodes.WhenNode[] conditions, Nodes.ElseNode else_clause)
-
-
Method Details
-
visitChildNodes
- Specified by:
visitChildNodesin classNodes.Node
-
childNodes
- Specified by:
childNodesin classNodes.Node
-
accept
- Specified by:
acceptin classNodes.Node
-
toString
- Specified by:
toStringin classNodes.Node
-