Module: EDNGRAMMAR::Tagged1

Defined in:
lib/parser/edngrammar.rb

Instance Method Summary collapse

Instance Method Details

#astObject



1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
# File 'lib/parser/edngrammar.rb', line 1658

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