mirror of
https://github.com/MontFerret/ferret.git
synced 2025-07-03 00:46:51 +02:00
18 lines
381 B
Go
18 lines
381 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(ctx context.Context, scope *core.Scope) (core.Value, error) {
|
||
|
return values.NewString(string(l)), nil
|
||
|
}
|