Module: Dhall::Parser::NumericDoubleLiteral

Defined in:
lib/dhall/parser.rb

Instance Method Summary collapse

Instance Method Details

#valueObject

Raises:

  • (Citrus::ParseError)


222
223
224
225
226
# File 'lib/dhall/parser.rb', line 222

def value
	float = string.to_f
	raise Citrus::ParseError, input if float.nan? || float.infinite?
	Double.new(value: float)
end