Class: Citrus::Assign
Instance Method Summary collapse
Instance Method Details
#codegen(g) ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/citrus/nodes.rb', line 28 def codegen(g) val = expression.codegen(g).last unless op.value.empty? val = g.equate(op.value, g.load(var.value), expression.codegen(g).last) end g.assign(var.value, val) end |