Module: EDNGRAMMAR::Array3

Defined in:
lib/parser/edngrammar.rb

Instance Method Summary collapse

Instance Method Details

#astObject



2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
# File 'lib/parser/edngrammar.rb', line 2027

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