Module: EDNGRAMMAR::Array3

Defined in:
lib/parser/edngrammar.rb

Instance Method Summary collapse

Instance Method Details

#astObject



1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
# File 'lib/parser/edngrammar.rb', line 1586

def ast
  r = if e = elements[2].elements
        [e[0].ast] + e[2].elements.map {|x| x.item.ast }
      else
        []
      end
  if ei = spec.ast
     if ei == ""
       r.cbor_stream!
     else
       warn "*** ignoring unimplemented encoding indicator #{ei.inspect} after ["
     end
  end
  r
end