Module: CDDLGRAMMAR::SESC2

Defined in:
lib/parser/cddlgrammar.rb

Instance Method Summary collapse

Instance Method Details

#astObject



3188
3189
3190
3191
3192
3193
3194
3195
# File 'lib/parser/cddlgrammar.rb', line 3188

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