ast

package
v2.0.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package ast defines abstract syntax tree types that represent Tamarin code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assign

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

Assign is a statement node used to describe a variable assignment.

func NewAssign

func NewAssign(operator token.Token, name *Ident, value Expression) *Assign

NewAssign creates a new Assign node.

func NewAssignIndex

func NewAssignIndex(operator token.Token, index *Index, value Expression) *Assign

NewAssignIndex creates a new Assign node for an index assignment.

func (*Assign) Index

func (a *Assign) Index() *Index

func (*Assign) IsExpression

func (a *Assign) IsExpression() bool

func (*Assign) Literal

func (a *Assign) Literal() string

func (*Assign) Name

func (a *Assign) Name() string

func (*Assign) Operator

func (a *Assign) Operator() string

func (*Assign) StatementNode

func (a *Assign) StatementNode()

func (*Assign) String

func (a *Assign) String() string

func (*Assign) Token

func (a *Assign) Token() token.Token

func (*Assign) Value

func (a *Assign) Value() Expression

type Block

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

Block is a node that holds a sequence of statements. This is used to represent the body of a function, loop, or a conditional.

func NewBlock

func NewBlock(token token.Token, statements []Node) *Block

NewBlock creates a new Block node.

func (*Block) EndsWithReturn

func (b *Block) EndsWithReturn() bool

func (*Block) IsExpression

func (b *Block) IsExpression() bool

func (*Block) Literal

func (b *Block) Literal() string

func (*Block) StatementNode

func (b *Block) StatementNode()

func (*Block) Statements

func (b *Block) Statements() []Node

func (*Block) String

func (b *Block) String() string

func (*Block) Token

func (b *Block) Token() token.Token

type Bool

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

Bool is an expression node that holds a boolean literal.

func NewBool

func NewBool(token token.Token, value bool) *Bool

NewBool creates a new Bool node.

func (*Bool) ExpressionNode

func (b *Bool) ExpressionNode()

func (*Bool) IsExpression

func (b *Bool) IsExpression() bool

func (*Bool) Literal

func (b *Bool) Literal() string

func (*Bool) String

func (b *Bool) String() string

func (*Bool) Token

func (b *Bool) Token() token.Token

func (*Bool) Value

func (b *Bool) Value() bool

type Call

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

Call is an expression node that describes the invocation of a function.

func NewCall

func NewCall(token token.Token, function Expression, arguments []Node) *Call

NewCall creates a new Call node.

func (*Call) Arguments

func (c *Call) Arguments() []Node

func (*Call) ExpressionNode

func (c *Call) ExpressionNode()

func (*Call) Function

func (c *Call) Function() Expression

func (*Call) IsExpression

func (c *Call) IsExpression() bool

func (*Call) Literal

func (c *Call) Literal() string

func (*Call) String

func (c *Call) String() string

func (*Call) Token

func (c *Call) Token() token.Token

type Case

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

Case is an expression node that describes one case within a switch expression.

func NewCase

func NewCase(token token.Token, expressions []Expression, block *Block) *Case

NewCase creates a new Case node.

func NewDefaultCase

func NewDefaultCase(token token.Token, block *Block) *Case

NewDefaultCase represents the default case within a switch expression.

func (*Case) Block

func (c *Case) Block() *Block

func (*Case) ExpressionNode

func (c *Case) ExpressionNode()

func (*Case) Expressions

func (c *Case) Expressions() []Expression

func (*Case) IsDefault

func (c *Case) IsDefault() bool

func (*Case) IsExpression

func (c *Case) IsExpression() bool

func (*Case) Literal

func (c *Case) Literal() string

func (*Case) String

func (c *Case) String() string

func (*Case) Token

func (c *Case) Token() token.Token

type Const

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

Const is a statement that defines a named constant.

func NewConst

func NewConst(token token.Token, name *Ident, value Expression) *Const

NewConst creates a new Const node.

func (*Const) IsExpression

func (c *Const) IsExpression() bool

func (*Const) Literal

func (c *Const) Literal() string

func (*Const) StatementNode

func (c *Const) StatementNode()

func (*Const) String

func (c *Const) String() string

func (*Const) Token

func (c *Const) Token() token.Token

func (*Const) Value

func (c *Const) Value() (string, Expression)

type Control

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

Control defines a return, break, or continue statement.

func NewControl

func NewControl(token token.Token, value Expression) *Control

NewControl creates a new Control node.

func (*Control) IsExpression

func (c *Control) IsExpression() bool

func (*Control) IsReturn

func (c *Control) IsReturn() bool

func (*Control) Literal

func (c *Control) Literal() string

func (*Control) StatementNode

func (c *Control) StatementNode()

func (*Control) String

func (c *Control) String() string

func (*Control) Token

func (c *Control) Token() token.Token

func (*Control) Value

func (c *Control) Value() Expression

type Expression

type Expression interface {
	// Node is embedded here to indicate that all expressions are AST nodes.
	Node

	// ExpressionNode signals that this Node is an expression.
	ExpressionNode()
}

Expression represents a snippet of Tamarin code that evaluates to a value. Expressions may be embedded within other expressions.

type Float

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

Float is an expression node that holds a floating point literal.

func NewFloat

func NewFloat(token token.Token, value float64) *Float

NewFloat creates a new Float node.

func (*Float) ExpressionNode

func (f *Float) ExpressionNode()

func (*Float) IsExpression

func (f *Float) IsExpression() bool

func (*Float) Literal

func (f *Float) Literal() string

func (*Float) String

func (f *Float) String() string

func (*Float) Token

func (f *Float) Token() token.Token

func (*Float) Value

func (f *Float) Value() float64

type For

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

For is a statement node that defines a for loop.

func NewFor

func NewFor(token token.Token, condition Node, consequence *Block, init Node, post Node) *For

NewFor creates a new For node.

func NewSimpleFor

func NewSimpleFor(token token.Token, consequence *Block) *For

NewSimpleFor creates a new For node with no condition, init, or post.

func (*For) Condition

func (f *For) Condition() Node

func (*For) Consequence

func (f *For) Consequence() *Block

func (*For) Init

func (f *For) Init() Node

func (*For) IsExpression

func (f *For) IsExpression() bool

func (*For) IsIteratorLoop

func (f *For) IsIteratorLoop() bool

func (*For) IsSimpleLoop

func (f *For) IsSimpleLoop() bool

func (*For) Literal

func (f *For) Literal() string

func (*For) Post

func (f *For) Post() Node

func (*For) StatementNode

func (f *For) StatementNode()

func (*For) String

func (f *For) String() string

func (*For) Token

func (f *For) Token() token.Token

type Func

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

Func is an expression node that holds a function literal.

func NewFunc

func NewFunc(token token.Token, name *Ident, parameters []*Ident, defaults map[string]Expression, body *Block) *Func

NewFunc creates a new Func node.

func (*Func) Body

func (f *Func) Body() *Block

func (*Func) Defaults

func (f *Func) Defaults() map[string]Expression

func (*Func) ExpressionNode

func (f *Func) ExpressionNode()

func (*Func) IsExpression

func (f *Func) IsExpression() bool

func (*Func) Literal

func (f *Func) Literal() string

func (*Func) Name

func (f *Func) Name() *Ident

func (*Func) ParameterNames

func (f *Func) ParameterNames() []string

func (*Func) Parameters

func (f *Func) Parameters() []*Ident

func (*Func) String

func (f *Func) String() string

func (*Func) Token

func (f *Func) Token() token.Token

type GetAttr

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

GetAttr is an expression node that describes the access of an attribute on an object.

func NewGetAttr

func NewGetAttr(token token.Token, object Expression, attribute *Ident) *GetAttr

NewGetAttr creates a new GetAttr node.

func (*GetAttr) ExpressionNode

func (e *GetAttr) ExpressionNode()

func (*GetAttr) IsExpression

func (e *GetAttr) IsExpression() bool

func (*GetAttr) Literal

func (e *GetAttr) Literal() string

func (*GetAttr) Name

func (e *GetAttr) Name() string

func (*GetAttr) Object

func (e *GetAttr) Object() Expression

func (*GetAttr) String

func (e *GetAttr) String() string

func (*GetAttr) Token

func (e *GetAttr) Token() token.Token

type Ident

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

Ident is an expression node that refers to a variable by name.

func NewIdent

func NewIdent(token token.Token) *Ident

NewIdent creates a new Ident node.

func (*Ident) ExpressionNode

func (i *Ident) ExpressionNode()

func (*Ident) IsExpression

func (i *Ident) IsExpression() bool

func (*Ident) Literal

func (i *Ident) Literal() string

func (*Ident) String

func (i *Ident) String() string

func (*Ident) Token

func (i *Ident) Token() token.Token

type If

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

If is an expression node that represents an if/else expression

func NewIf

func NewIf(token token.Token, condition Expression, consequence *Block, alternative *Block) *If

NewIf creates a new If node.

func (*If) Alternative

func (i *If) Alternative() *Block

func (*If) Condition

func (i *If) Condition() Expression

func (*If) Consequence

func (i *If) Consequence() *Block

func (*If) ExpressionNode

func (i *If) ExpressionNode()

func (*If) IsExpression

func (i *If) IsExpression() bool

func (*If) Literal

func (i *If) Literal() string

func (*If) String

func (i *If) String() string

func (*If) Token

func (i *If) Token() token.Token

type Import

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

Import is a statement node that describes a module import statement.

func NewImport

func NewImport(token token.Token, name *Ident) *Import

NewImport creates a new Import node.

func (*Import) IsExpression

func (i *Import) IsExpression() bool

func (*Import) Literal

func (i *Import) Literal() string

func (*Import) Module

func (i *Import) Module() *Ident

func (*Import) StatementNode

func (i *Import) StatementNode()

func (*Import) String

func (i *Import) String() string

func (*Import) Token

func (i *Import) Token() token.Token

type In

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

In is an expression node that checks whether a value is present in a container.

func NewIn

func NewIn(token token.Token, left Expression, right Expression) *In

NewIn creates a new In node.

func (*In) ExpressionNode

func (i *In) ExpressionNode()

func (*In) IsExpression

func (i *In) IsExpression() bool

func (*In) Left

func (i *In) Left() Expression

func (*In) Literal

func (i *In) Literal() string

func (*In) Right

func (i *In) Right() Expression

func (*In) String

func (i *In) String() string

func (*In) Token

func (i *In) Token() token.Token

type Index

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

Index as an expression node that describes indexing on an object.

func NewIndex

func NewIndex(token token.Token, left Expression, index Expression) *Index

NewIndex creates a new Index node.

func (*Index) ExpressionNode

func (i *Index) ExpressionNode()

func (*Index) Index

func (i *Index) Index() Expression

func (*Index) IsExpression

func (i *Index) IsExpression() bool

func (*Index) Left

func (i *Index) Left() Expression

func (*Index) Literal

func (i *Index) Literal() string

func (*Index) String

func (i *Index) String() string

func (*Index) Token

func (i *Index) Token() token.Token

type Infix

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

Infix is an operator expression where the operator is between the operands. Examples include "x + y" and "5 - 1".

func NewInfix

func NewInfix(token token.Token, left Expression, operator string, right Expression) *Infix

NewInfix creates a new Infix node.

func (*Infix) ExpressionNode

func (i *Infix) ExpressionNode()

func (*Infix) IsExpression

func (i *Infix) IsExpression() bool

func (*Infix) Left

func (i *Infix) Left() Expression

func (*Infix) Literal

func (i *Infix) Literal() string

func (*Infix) Operator

func (i *Infix) Operator() string

func (*Infix) Right

func (i *Infix) Right() Expression

func (*Infix) String

func (i *Infix) String() string

func (*Infix) Token

func (i *Infix) Token() token.Token

type Int

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

Int is an expression node that holds an integer literal.

func NewInt

func NewInt(token token.Token, value int64) *Int

NewInt creates a new Int node.

func (*Int) ExpressionNode

func (i *Int) ExpressionNode()

func (*Int) IsExpression

func (i *Int) IsExpression() bool

func (*Int) Literal

func (i *Int) Literal() string

func (*Int) String

func (i *Int) String() string

func (*Int) Token

func (i *Int) Token() token.Token

func (*Int) Value

func (i *Int) Value() int64

type List

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

List is an expression node that builds a list data structure.

func NewList

func NewList(tok token.Token, items []Expression) *List

NewList creates a new List node.

func (*List) ExpressionNode

func (l *List) ExpressionNode()

func (*List) IsExpression

func (l *List) IsExpression() bool

func (*List) Items

func (l *List) Items() []Expression

func (*List) Literal

func (l *List) Literal() string

func (*List) String

func (l *List) String() string

func (*List) Token

func (l *List) Token() token.Token

type Map

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

Map is an expression node that builds a map data structure.

func NewMap

func NewMap(token token.Token, items map[Expression]Expression) *Map

NewMap creates a new Map node.

func (*Map) ExpressionNode

func (m *Map) ExpressionNode()

func (*Map) IsExpression

func (m *Map) IsExpression() bool

func (*Map) Items

func (m *Map) Items() map[Expression]Expression

func (*Map) Literal

func (m *Map) Literal() string

func (*Map) String

func (m *Map) String() string

func (*Map) Token

func (m *Map) Token() token.Token

type MultiVar

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

MultiVar is a statement that assigns values to more than one variable. The right hand side must be a container type, with the same number of elements as the number of variables on the left hand side.

func NewMultiVar

func NewMultiVar(token token.Token, names []*Ident, value Expression, isWalrus bool) *MultiVar

func (*MultiVar) IsExpression

func (s *MultiVar) IsExpression() bool

func (*MultiVar) IsWalrus

func (s *MultiVar) IsWalrus() bool

func (*MultiVar) Literal

func (s *MultiVar) Literal() string

func (*MultiVar) StatementNode

func (s *MultiVar) StatementNode()

func (*MultiVar) String

func (s *MultiVar) String() string

func (*MultiVar) Token

func (s *MultiVar) Token() token.Token

func (*MultiVar) Value

func (s *MultiVar) Value() ([]string, Expression)

type Nil

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

Nil is an expression node that holds a nil literal.

func NewNil

func NewNil(token token.Token) *Nil

NewNil creates a new Nil node.

func (*Nil) ExpressionNode

func (n *Nil) ExpressionNode()

func (*Nil) IsExpression

func (n *Nil) IsExpression() bool

func (*Nil) Literal

func (n *Nil) Literal() string

func (*Nil) String

func (n *Nil) String() string

func (*Nil) Token

func (n *Nil) Token() token.Token

type Node

type Node interface {

	// Token returns the token where this Node begins.
	Token() token.Token

	// Literal returns the string from the first token that defines the Node.
	Literal() string

	// String returns a human friendly representation of the Node. This should
	// be similar to the original source code, but not necessarily identical.
	String() string

	// IsExpression returns true if this Node evalutes to a value.
	IsExpression() bool
}

Node reresents a portion of the syntax tree. All nodes have a token, which is the token that begins the node. A Node may be an Expression, in which case it evaluates to a value.

type ObjectCall

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

ObjectCall is an expression node that describes the invocation of a method on an object.

func NewObjectCall

func NewObjectCall(token token.Token, object Expression, call Expression) *ObjectCall

NewObjectCall creates a new ObjectCall node.

func (*ObjectCall) Call

func (c *ObjectCall) Call() Expression

func (*ObjectCall) ExpressionNode

func (c *ObjectCall) ExpressionNode()

func (*ObjectCall) IsExpression

func (c *ObjectCall) IsExpression() bool

func (*ObjectCall) Literal

func (c *ObjectCall) Literal() string

func (*ObjectCall) Object

func (c *ObjectCall) Object() Expression

func (*ObjectCall) String

func (c *ObjectCall) String() string

func (*ObjectCall) Token

func (c *ObjectCall) Token() token.Token

type Pipe

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

Pipe is an expression node that describes a sequence of transformations applied to an initial value.

func NewPipe

func NewPipe(token token.Token, exprs []Expression) *Pipe

NewPipe creates a new Pipe node.

func (*Pipe) ExpressionNode

func (p *Pipe) ExpressionNode()

func (*Pipe) Expressions

func (p *Pipe) Expressions() []Expression

func (*Pipe) IsExpression

func (p *Pipe) IsExpression() bool

func (*Pipe) Literal

func (p *Pipe) Literal() string

func (*Pipe) String

func (p *Pipe) String() string

func (*Pipe) Token

func (p *Pipe) Token() token.Token

type Postfix

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

Postfix is a statement node that describes a postfix expression like "x++".

func NewPostfix

func NewPostfix(token token.Token, operator string) *Postfix

NewPostfix creates a new Postfix node.

func (*Postfix) IsExpression

func (p *Postfix) IsExpression() bool

func (*Postfix) Literal

func (p *Postfix) Literal() string

func (*Postfix) Operator

func (p *Postfix) Operator() string

func (*Postfix) StatementNode

func (p *Postfix) StatementNode()

func (*Postfix) String

func (p *Postfix) String() string

func (*Postfix) Token

func (p *Postfix) Token() token.Token

type Prefix

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

Prefix is an operator expression where the operator precedes the operand. Examples include "!false" and "-x".

func NewPrefix

func NewPrefix(token token.Token, right Expression) *Prefix

NewPrefix creates a new Prefix node.

func (*Prefix) ExpressionNode

func (p *Prefix) ExpressionNode()

func (*Prefix) IsExpression

func (p *Prefix) IsExpression() bool

func (*Prefix) Literal

func (p *Prefix) Literal() string

func (*Prefix) Operator

func (p *Prefix) Operator() string

func (*Prefix) Right

func (p *Prefix) Right() Expression

func (*Prefix) String

func (p *Prefix) String() string

func (*Prefix) Token

func (p *Prefix) Token() token.Token

type Program

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

Program represents a complete Tamarin program, which consists of a series of statements.

func NewProgram

func NewProgram(statements []Node) *Program

func (*Program) First

func (p *Program) First() Node

func (*Program) IsExpression

func (p *Program) IsExpression() bool

func (*Program) Literal

func (p *Program) Literal() string

func (*Program) Statements

func (p *Program) Statements() []Node

func (*Program) String

func (p *Program) String() string

func (*Program) Token

func (p *Program) Token() token.Token

type Range

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

Range is an expression node that describes iterating over a container.

func NewRange

func NewRange(token token.Token, container Node) *Range

NewRange creates a new Range node.

func (*Range) Container

func (r *Range) Container() Node

func (*Range) ExpressionNode

func (r *Range) ExpressionNode()

func (*Range) IsExpression

func (r *Range) IsExpression() bool

func (*Range) Literal

func (r *Range) Literal() string

func (*Range) String

func (r *Range) String() string

func (*Range) Token

func (r *Range) Token() token.Token

type Set

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

Set is an expression node that builds a set data structure.

func NewSet

func NewSet(token token.Token, items []Expression) *Set

NewSet creates a new Set node.

func (*Set) ExpressionNode

func (s *Set) ExpressionNode()

func (*Set) IsExpression

func (s *Set) IsExpression() bool

func (*Set) Items

func (s *Set) Items() []Expression

func (*Set) Literal

func (s *Set) Literal() string

func (*Set) String

func (s *Set) String() string

func (*Set) Token

func (s *Set) Token() token.Token

type Slice

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

Slice is an expression node that describes a slicing operation on an object.

func NewSlice

func NewSlice(token token.Token, left Expression, fromIndex Expression, toIndex Expression) *Slice

NewSlice creates a new Slice node.

func (*Slice) ExpressionNode

func (s *Slice) ExpressionNode()

func (*Slice) FromIndex

func (s *Slice) FromIndex() Expression

func (*Slice) IsExpression

func (s *Slice) IsExpression() bool

func (*Slice) Left

func (s *Slice) Left() Expression

func (*Slice) Literal

func (s *Slice) Literal() string

func (*Slice) String

func (s *Slice) String() string

func (*Slice) ToIndex

func (s *Slice) ToIndex() Expression

func (*Slice) Token

func (s *Slice) Token() token.Token

type Statement

type Statement interface {
	// Node is embedded here to indicate that all statements are AST nodes.
	Node

	// StatementNode signals that this Node is a statement.
	StatementNode()
}

Statement represents a snippet of Tamarin code that causes a side effect, but does not evaluate to a value.

type String

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

String is an expression node that holds a string literal.

func NewString

func NewString(tok token.Token) *String

NewString creates a new String node.

func NewTemplatedString

func NewTemplatedString(tok token.Token, template *tmpl.Template, exprs []Expression) *String

NewTemplatedString creates a new String node defined by a template.

func (*String) ExpressionNode

func (s *String) ExpressionNode()

func (*String) IsExpression

func (s *String) IsExpression() bool

func (*String) Literal

func (s *String) Literal() string

func (*String) String

func (s *String) String() string

func (*String) Template

func (s *String) Template() *tmpl.Template

func (*String) TemplateExpressions

func (s *String) TemplateExpressions() []Expression

func (*String) Token

func (s *String) Token() token.Token

func (*String) Value

func (s *String) Value() string

type Switch

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

Switch is an expression node that describes a switch between multiple cases.

func NewSwitch

func NewSwitch(token token.Token, value Expression, choices []*Case) *Switch

NewSwitch creates a new Switch node.

func (*Switch) Choices

func (s *Switch) Choices() []*Case

func (*Switch) ExpressionNode

func (s *Switch) ExpressionNode()

func (*Switch) IsExpression

func (s *Switch) IsExpression() bool

func (*Switch) Literal

func (s *Switch) Literal() string

func (*Switch) String

func (s *Switch) String() string

func (*Switch) Token

func (s *Switch) Token() token.Token

func (*Switch) Value

func (s *Switch) Value() Expression

type Ternary

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

Ternary is an expression node that defines a ternary expression and evaluates to one of two values based on a condition.

func NewTernary

func NewTernary(token token.Token, condition Expression, ifTrue Expression, ifFalse Expression) *Ternary

NewTernary creates a new Ternary node.

func (*Ternary) Condition

func (t *Ternary) Condition() Expression

func (*Ternary) ExpressionNode

func (t *Ternary) ExpressionNode()

func (*Ternary) IfFalse

func (t *Ternary) IfFalse() Expression

func (*Ternary) IfTrue

func (t *Ternary) IfTrue() Expression

func (*Ternary) IsExpression

func (t *Ternary) IsExpression() bool

func (*Ternary) Literal

func (t *Ternary) Literal() string

func (*Ternary) String

func (t *Ternary) String() string

func (*Ternary) Token

func (t *Ternary) Token() token.Token

type Var

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

Var is a statement that assigns a value to a variable. It may be a declaration or an assignment. If it's a declaration, isWalrus is true.

func NewDeclaration

func NewDeclaration(token token.Token, name *Ident, value Expression) *Var

NewDeclaration creates a new Var node that is a declaration.

func NewVar

func NewVar(token token.Token, name *Ident, value Expression) *Var

NewVar creates a new Var node.

func (*Var) IsExpression

func (s *Var) IsExpression() bool

func (*Var) IsWalrus

func (s *Var) IsWalrus() bool

func (*Var) Literal

func (s *Var) Literal() string

func (*Var) StatementNode

func (s *Var) StatementNode()

func (*Var) String

func (s *Var) String() string

func (*Var) Token

func (s *Var) Token() token.Token

func (*Var) Value

func (s *Var) Value() (string, Expression)

Jump to

Keyboard shortcuts

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