1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-23 01:24:30 +02:00
ferret/pkg/runtime/expressions/literals/string.go

18 lines
375 B
Go
Raw Normal View History

2018-09-18 22:42:38 +02:00
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)
}
2018-10-05 23:20:48 +02:00
func (l StringLiteral) Exec(_ context.Context, _ *core.Scope) (core.Value, error) {
2018-09-18 22:42:38 +02:00
return values.NewString(string(l)), nil
}