github.com/MontFerret/ferret@v0.18.0/pkg/runtime/expressions/literals/none.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 noneLiteral struct{} 11 12 var None = &noneLiteral{} 13 14 func (l noneLiteral) Exec(_ context.Context, _ *core.Scope) (core.Value, error) { 15 return values.None, nil 16 } 17 18 func IsNone(exp core.Expression) bool { 19 _, is := exp.(*noneLiteral) 20 21 return is 22 }