Class: Citrus::Begin

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

Instance Method Summary collapse

Instance Method Details

#codegen(g) ⇒ Object



124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/citrus/nodes.rb', line 124

def codegen(g)
  expressions.each { |e| e.codegen(g) }
  rb = g.block do |gb|
    rescue_expressions.each { |e| e.codegen(gb) }
  end
  elb = g.block do |gb|
    else_expressions.each { |e| e.codegen(gb) }
  end
  enb = g.block do |gb|
    ensure_expressions.each { |e| e.codegen(gb) }
  end
  g.begin(rb, elb, enb)
end