Class: AssignableNode

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

Overview


Instance Attribute Summary

Attributes inherited from UnaryNode

#subTree

Instance Method Summary collapse

Constructor Details

#initialize(valor1, nombre) ⇒ AssignableNode

Returns a new instance of AssignableNode.



113
114
115
116
# File 'lib/ast.rb', line 113

def initialize(valor1,nombre)
  super(valor1)
 @name=nombre
end

Instance Method Details

#evaluateObject



118
119
120
121
122
# File 'lib/ast.rb', line 118

def evaluate
  guardar=@subTree.evaluate()
  $calc.addVar(@name,guardar)
  return guardar
end