Module: JPTGRAMMAR::Number1

Defined in:
lib/parser/jptgrammar.rb

Instance Method Summary collapse

Instance Method Details

#astObject



3268
3269
3270
3271
3272
3273
3274
3275
3276
# File 'lib/parser/jptgrammar.rb', line 3268

def ast
  if elements[0].text_value == "-0" ||
     elements[1].text_value != "" ||
     elements[2].text_value != ""
    text_value.to_f
  else
    text_value.to_i
  end
end