Class: CompStmtNode
Overview
Root Program Node
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
- #evaluate ⇒ Object
-
#initialize(stmt_compstmt) ⇒ CompStmtNode
constructor
A new instance of CompStmtNode.
Methods inherited from Node
Constructor Details
#initialize(stmt_compstmt) ⇒ CompStmtNode
Returns a new instance of CompStmtNode.
212 213 214 215 |
# File 'lib/nodes/basenodes.rb', line 212 def initialize(stmt_compstmt) super @comp_statements = stmt_compstmt end |
Instance Method Details
#evaluate ⇒ Object
217 218 219 220 |
# File 'lib/nodes/basenodes.rb', line 217 def evaluate @comp_statements[0].evaluate @comp_statements[1].evaluate end |