Module: EDNGRAMMAR::Array3

Defined in:
lib/parser/edngrammar.rb

Instance Method Summary collapse

Instance Method Details

#astObject



1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
# File 'lib/parser/edngrammar.rb', line 1599

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