Module: EDNGRAMMAR::AppString1
- Defined in:
- lib/parser/edngrammar.rb
Instance Method Summary collapse
-
#ast ⇒ Object
XXX ignoring h and b64.
Instance Method Details
#ast ⇒ Object
XXX ignoring h and b64
1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 |
# File 'lib/parser/edngrammar.rb', line 1454 def ast # XXX ignoring h and b64 data = sqstr.ast.force_encoding(Encoding::UTF_8) # XXX undo .b app = app_prefix.text_value # Find a better place to put a default initialization EDNGRAMMAR.const_set(:APPS, Hash.new { |h, k| h[k] = begin ::CBOR_DIAG.const_get("App_#{app}") rescue NameError raise ArgumentError, "cbor-diagnostic: Unknown application-oriented extension '#{k}'", caller end }) unless ::EDNGRAMMAR.const_defined?(:APPS) ::EDNGRAMMAR::APPS[app].decode(app, data) end |