class Flor::Pro::DoTrap

Public Instance Methods

rewrite_tree() click to toggle source
# File lib/flor/punit/do_trap.rb, line 27
def rewrite_tree

  l = tree[2]

  th = [ 'trap', [], l, *tree[3] ]
  att_children.each { |ac| th[1] << Flor.dup(ac) }

  td = [ 'def', [], l ]
  td[1] << [ '_att', [ [ 'msg', [], l ] ], l ]
  non_att_children.each { |nac| td[1] << Flor.dup(nac) }

  th[1] << td

  th
end