literals

package
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var None = &noneLiteral{}

Functions

func IsNone added in v0.16.0

func IsNone(exp core.Expression) bool

Types

type ArrayLiteral

type ArrayLiteral struct {
	// contains filtered or unexported fields
}

func NewArrayLiteral

func NewArrayLiteral(size int) *ArrayLiteral

func NewArrayLiteralWith

func NewArrayLiteralWith(elements []core.Expression) *ArrayLiteral

func (*ArrayLiteral) Exec

func (l *ArrayLiteral) Exec(ctx context.Context, scope *core.Scope) (core.Value, error)

func (*ArrayLiteral) Push

func (l *ArrayLiteral) Push(expression core.Expression)

type BooleanLiteral

type BooleanLiteral bool

func NewBooleanLiteral

func NewBooleanLiteral(val bool) BooleanLiteral

func (BooleanLiteral) Exec

type FloatLiteral

type FloatLiteral float64

func NewFloatLiteral

func NewFloatLiteral(value float64) FloatLiteral

func (FloatLiteral) Exec

func (l FloatLiteral) Exec(_ context.Context, _ *core.Scope) (core.Value, error)

type IntLiteral

type IntLiteral int

func NewIntLiteral

func NewIntLiteral(value int) IntLiteral

func (IntLiteral) Exec

func (l IntLiteral) Exec(_ context.Context, _ *core.Scope) (core.Value, error)

type ObjectLiteral

type ObjectLiteral struct {
	// contains filtered or unexported fields
}

func NewObjectLiteral

func NewObjectLiteral(props []*ObjectPropertyAssignment) *ObjectLiteral

func NewObjectLiteralWith

func NewObjectLiteralWith(props ...*ObjectPropertyAssignment) *ObjectLiteral

func (*ObjectLiteral) Exec

func (l *ObjectLiteral) Exec(ctx context.Context, scope *core.Scope) (core.Value, error)

type ObjectPropertyAssignment

type ObjectPropertyAssignment struct {
	// contains filtered or unexported fields
}

func NewObjectPropertyAssignment

func NewObjectPropertyAssignment(name, value core.Expression) (*ObjectPropertyAssignment, error)

type StringLiteral

type StringLiteral string

func NewStringLiteral

func NewStringLiteral(str string) StringLiteral

func (StringLiteral) Exec

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL