Module: EDNGRAMMAR::Tagged1

Defined in:
lib/parser/edngrammar.rb

Instance Method Summary collapse

Instance Method Details

#astObject



1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
# File 'lib/parser/edngrammar.rb', line 1804

def ast
  tagnum = uint.text_value.to_i
  tagval = item.ast
  if tagnum == 999 && $options.app_now
    app, args = tagval
    val = ::EDNGRAMMAR::APPS[app].decode(app, *args)
  else
    val = CBOR::Tagged.new(tagnum, tagval)
  end
  if ei = spec.text_value[1..-1]
    val = CBOR::Box.from_instance(val, {ei: ei})
    # warn "*** implementing encoding indicator #{ei.inspect} after tag number #{uint.text_value}"
  end
  val
end