expr

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binary

type Binary struct {
	X     ast.Expression //left operand
	Token ast.Token
	Y     ast.Expression //left operand
}

Binary represents binary expressions

func BinaryExpression

func BinaryExpression(left ast.Expression, token ast.Token, right ast.Expression) *Binary

BinaryExpression creates new *Binary

func (*Binary) Type

func (b *Binary) Type() reflect.Type

type Call

type Call struct {
	Args []ast.Expression
	X    ast.Expression
}

Call represents function call

func (*Call) Type

func (c *Call) Type() reflect.Type

type Literal

type Literal struct {
	Value string
	RType reflect.Type
}

Literal represents constant value i.e. 1, "foo" etc

func BoolExpression

func BoolExpression(value string) *Literal

BoolExpression creates bool literal

func NumberExpression

func NumberExpression(value string) *Literal

NumberExpression creates number literal

func StringExpression

func StringExpression(value string) *Literal

StringExpression creates string literal

func (*Literal) Type

func (l *Literal) Type() reflect.Type

type Parentheses

type Parentheses struct {
	P ast.Expression
}

Parentheses used to add precedence to the expression over other expression

func (*Parentheses) Type

func (p *Parentheses) Type() reflect.Type

type Select

type Select struct {
	ID string
	X  ast.Expression
}

Select represents dynamic variable

func (Select) Type

func (s Select) Type() reflect.Type

type SliceIndex

type SliceIndex struct {
	X ast.Expression
	Y ast.Expression
}

SliceIndex represents slice accessor

func (*SliceIndex) Type

func (s *SliceIndex) Type() reflect.Type

type Unary

type Unary struct {
	Token ast.Token
	X     ast.Expression
}

Unary represents unary expression

func (*Unary) Type

func (u *Unary) Type() reflect.Type

Jump to

Keyboard shortcuts

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