Module: CDDLGRAMMAR::SESC2

Defined in:
lib/parser/cddlgrammar.rb

Instance Method Summary collapse

Instance Method Details

#astObject



3264
3265
3266
3267
3268
3269
3270
3271
# File 'lib/parser/cddlgrammar.rb', line 3264

def ast
  tv = elements[1].text_value
  if /\Au\{(\h+)\}/ =~ tv
    $1.hex.chr(Encoding::UTF_8)
  else
    JSON.load("\"\\#{tv}\"")
  end
end