github.com/MontFerret/ferret@v0.18.0/pkg/runtime/expressions/literals/float.go (about) 1 package literals 2 3 import ( 4 "context" 5 6 "github.com/MontFerret/ferret/pkg/runtime/core" 7 "github.com/MontFerret/ferret/pkg/runtime/values" 8 ) 9 10 type FloatLiteral float64 11 12 func NewFloatLiteral(value float64) FloatLiteral { 13 return FloatLiteral(value) 14 } 15 16 func (l FloatLiteral) Exec(_ context.Context, _ *core.Scope) (core.Value, error) { 17 return values.NewFloat(float64(l)), nil 18 }