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
1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 |
# File 'lib/parser/edngrammar.rb', line 1167 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 |