Class: Electr::OperatorAST
Overview
A node in the AST to hold an operator, ie +, -, etc.
Instance Attribute Summary
Attributes inherited from AST
Instance Method Summary collapse
-
#initialize(value) ⇒ OperatorAST
constructor
A new instance of OperatorAST.
Methods inherited from AST
#add_child, #display, #leaf?, #size, #to_pn
Constructor Details
#initialize(value) ⇒ OperatorAST
Returns a new instance of OperatorAST.
6 7 8 9 |
# File 'lib/electr/ast/operator_ast.rb', line 6 def initialize(value) super("operator") @value = value end |