Class: CompStmtNode

Inherits:
Node
  • Object
show all
Defined in:
lib/nodes/basenodes.rb

Overview

Root Program Node

Instance Attribute Summary

Attributes inherited from Node

#value

Instance Method Summary collapse

Methods inherited from Node

#to_s

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

#evaluateObject



217
218
219
220
# File 'lib/nodes/basenodes.rb', line 217

def evaluate
  @comp_statements[0].evaluate
  @comp_statements[1].evaluate
end