Module: EDNGRAMMAR::Array3

Defined in:
lib/parser/edngrammar.rb

Instance Method Summary collapse

Instance Method Details

#astObject



1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
# File 'lib/parser/edngrammar.rb', line 1815

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