Module: EDNGRAMMAR::Map3

Defined in:
lib/parser/edngrammar.rb

Instance Method Summary collapse

Instance Method Details

#astObject



1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
# File 'lib/parser/edngrammar.rb', line 1637

def ast
  r = if e = elements[2].elements
        Hash[ [e[0].ast] + e[2].elements.map {|x| x.kp.ast } ]
      else
        {}
      end
  if spec.ast
    r.cbor_stream!
  end
  r
end