expr

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: Apache-2.0 Imports: 4 Imported by: 2 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binary

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

Binary represents binary expressions

func BinaryExpression

func BinaryExpression(left ast2.Expression, token ast2.Token, right ast2.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 BoolLiteral added in v0.2.0

func BoolLiteral(value string) *Literal

BoolLiteral creates bool literal

func Number added in v0.2.0

func Number(value int) *Literal

func NumberLiteral added in v0.2.0

func NumberLiteral(value string) *Literal

NumberLiteral creates number literal

func StringLiteral added in v0.2.0

func StringLiteral(value string) *Literal

StringLiteral 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 Range added in v0.2.0

type Range struct {
	X *Literal
	Y *Literal
}

func (*Range) Type added in v0.2.0

func (r *Range) Type() reflect.Type

type Select

type Select struct {
	ID       string
	X        ast.Expression
	FullName string
}

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 ast2.Token
	X     ast2.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