Class: Logicality::Parser::Ast::UnaryOperatorNode
- Defined in:
- lib/logicality/parser/ast/unary_operator_node.rb
Overview
A unary operator node has just one child node.
Instance Attribute Summary collapse
-
#child ⇒ Object
readonly
Returns the value of attribute child.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(child, token) ⇒ UnaryOperatorNode
constructor
A new instance of UnaryOperatorNode.
Methods inherited from Node
Constructor Details
#initialize(child, token) ⇒ UnaryOperatorNode
Returns a new instance of UnaryOperatorNode.
17 18 19 20 21 22 |
# File 'lib/logicality/parser/ast/unary_operator_node.rb', line 17 def initialize(child, token) super(token) @name = 'unary_operator_node' @child = child end |
Instance Attribute Details
#child ⇒ Object (readonly)
Returns the value of attribute child.
15 16 17 |
# File 'lib/logicality/parser/ast/unary_operator_node.rb', line 15 def child @child end |