Module: EDNGRAMMAR::Tagged1

Defined in:
lib/parser/edngrammar.rb

Instance Method Summary collapse

Instance Method Details

#astObject



1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
# File 'lib/parser/edngrammar.rb', line 1690

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