Class: Citrus::GlobalEq

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

Instance Method Summary collapse

Instance Method Details

#codegen(g) ⇒ Object



38
39
40
41
42
43
44
# File 'lib/citrus/nodes.rb', line 38

def codegen(g)
  val = expression.codegen(g).last
  unless op.value.empty?
    val = g.load_index(op.value, g.load_global(globalvar.value), expression.codegen(g).last)
  end
  g.assign_global(globalvar.value, val)
end