Class: PlusNode

Inherits:
UnaryNode show all
Defined in:
lib/ast.rb

Instance Attribute Summary

Attributes inherited from UnaryNode

#subTree

Instance Method Summary collapse

Constructor Details

#initialize(subTree) ⇒ PlusNode



85
86
87
# File 'lib/ast.rb', line 85

def initialize(subTree)
  super(subTree)
end

Instance Method Details

#evaluateObject



89
90
91
# File 'lib/ast.rb', line 89

def evaluate    
  $calc.memory+=subTree.evaluate
end