github.com/MontFerret/ferret@v0.18.0/pkg/runtime/expressions/literals/string.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 StringLiteral string 11 12 func NewStringLiteral(str string) StringLiteral { 13 return StringLiteral(str) 14 } 15 16 func (l StringLiteral) Exec(_ context.Context, _ *core.Scope) (core.Value, error) { 17 return values.NewString(string(l)), nil 18 }