1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-01-18 03:22:02 +02:00
ferret/pkg/runtime/expressions/literals/float.go
2018-09-18 16:42:38 -04:00

18 lines
382 B
Go

package literals
import (
"context"
"github.com/MontFerret/ferret/pkg/runtime/core"
"github.com/MontFerret/ferret/pkg/runtime/values"
)
type FloatLiteral float64
func NewFloatLiteral(value float64) FloatLiteral {
return FloatLiteral(value)
}
func (l FloatLiteral) Exec(ctx context.Context, scope *core.Scope) (core.Value, error) {
return values.NewFloat(float64(l)), nil
}