Module: EDNGRAMMAR::Streamstring2

Defined in:
lib/parser/edngrammar.rb

Instance Method Summary collapse

Instance Method Details

#astObject



4104
4105
4106
4107
4108
4109
4110
# File 'lib/parser/edngrammar.rb', line 4104

def ast
  strings = [elements[2].ast] + elements[3].elements.map {|x| x.string.ast }
  unless Set[*strings.map(&:encoding)].size == 1
    warn "*** mixed streamstring #{strings.cbor_diagnostic}"
  end
  strings.join.cbor_stream!(strings.map(&:size))
end