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.
198 199 200 201 |
# File 'lib/nodes/basenodes.rb', line 198 def initialize(stmt_compstmt) super @comp_statements = stmt_compstmt end |
Instance Method Details
#evaluate ⇒ Object
203 204 205 206 |
# File 'lib/nodes/basenodes.rb', line 203 def evaluate @comp_statements[0].evaluate @comp_statements[1].evaluate end |