Package org.ruby_lang.prism
Class Nodes.AssocNode
java.lang.Object
org.ruby_lang.prism.Nodes.Node
org.ruby_lang.prism.Nodes.AssocNode
- Enclosing class:
- Nodes
Represents a hash key/value pair.
{ a => b }
^^^^^^
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Nodes.NodeThe key of the association.final Nodes.NodeThe value of the association, if present.Fields inherited from class org.ruby_lang.prism.Nodes.Node
EMPTY_ARRAY, length, nodeId, startOffset -
Constructor Summary
ConstructorsConstructorDescriptionAssocNode(int nodeId, int startOffset, int length, Nodes.Node key, Nodes.Node value) -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(AbstractNodeVisitor<T> visitor) protected String<T> voidvisitChildNodes(AbstractNodeVisitor<T> visitor) Methods inherited from class org.ruby_lang.prism.Nodes.Node
endOffset, hasNewLineFlag, setNewLineFlag, setNewLineFlag, toString
-
Field Details
-
key
The key of the association. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). { a: b } ^ { foo => bar } ^^^ { def a; end => 1 } ^^^^^^^^^^ -
value
The value of the association, if present. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). { foo => bar } ^^^ { x: 1 } ^
-
-
Constructor Details
-
AssocNode
-
-
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
-