1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-16 11:37:36 +02:00
ferret/pkg/runtime/expressions/literals/string.go
2018-10-05 17:38:12 -04:00

18 lines
375 B
Go

package literals
import (
"context"
"github.com/MontFerret/ferret/pkg/runtime/core"
"github.com/MontFerret/ferret/pkg/runtime/values"
)
type StringLiteral string
func NewStringLiteral(str string) StringLiteral {
return StringLiteral(str)
}
func (l StringLiteral) Exec(_ context.Context, _ *core.Scope) (core.Value, error) {
return values.NewString(string(l)), nil
}