Class: Citrus::Call

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

Instance Method Summary collapse

Instance Method Details

#codegen(g) ⇒ Object



96
97
98
99
100
101
102
103
# File 'lib/citrus/nodes.rb', line 96

def codegen(g)
  arg_values = calllist.args.map { |arg| arg.codegen(g) }
  begin
    g.call(func.value, *arg_values)
  rescue
    Citrus.error(NameError.new(func.value, true))
  end
end