ast

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package ast contains the definitions of the abstract syntax tree that our parser produces and that our interpreter executes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assign added in v0.0.13

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

Assign is generally used for a simple assignment like "x = y". We also support other operators like "+=", "-=", "*=", and "/=".

func NewAssign added in v0.0.13

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

func NewAssignIndex added in v0.0.13

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

func (*Assign) ExpressionNode added in v0.0.13

func (a *Assign) ExpressionNode()

func (*Assign) Index added in v0.0.13

func (a *Assign) Index() *Index

func (*Assign) Literal added in v0.0.13

func (a *Assign) Literal() string

func (*Assign) Name added in v0.0.13

func (a *Assign) Name() string

func (*Assign) Operator added in v0.0.13

func (a *Assign) Operator() string

func (*Assign) String added in v0.0.13

func (a *Assign) String() string

func (*Assign) Token added in v0.0.13

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

func (*Assign) Value added in v0.0.13

func (a *Assign) Value() Expression

type Block added in v0.0.13

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

Block holds a sequence of statements, which are treated as a group. This may represent the body of a function, loop, or a conditional block.

func NewBlock added in v0.0.13

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

func (*Block) Literal added in v0.0.13

func (b *Block) Literal() string

func (*Block) StatementNode added in v0.0.13

func (b *Block) StatementNode()

func (*Block) Statements added in v0.0.13

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

func (*Block) String added in v0.0.13

func (b *Block) String() string

func (*Block) Token added in v0.0.13

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

type Bool added in v0.0.11

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

Bool holds the boolean "true" or "false"

func NewBool added in v0.0.13

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

func (*Bool) ExpressionNode added in v0.0.13

func (b *Bool) ExpressionNode()

func (*Bool) Literal added in v0.0.13

func (b *Bool) Literal() string

func (*Bool) String added in v0.0.11

func (b *Bool) String() string

func (*Bool) Token added in v0.0.11

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

func (*Bool) Value added in v0.0.11

func (b *Bool) Value() bool

type Call added in v0.0.13

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

Call holds the invocation of a method.

func NewCall added in v0.0.13

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

func (*Call) Arguments added in v0.0.13

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

func (*Call) ExpressionNode added in v0.0.13

func (c *Call) ExpressionNode()

func (*Call) Function added in v0.0.13

func (c *Call) Function() Expression

func (*Call) Literal added in v0.0.13

func (c *Call) Literal() string

func (*Call) String added in v0.0.13

func (c *Call) String() string

func (*Call) Token added in v0.0.13

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

type Case added in v0.0.13

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

Case handles the case within a switch statement

func NewCase added in v0.0.13

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

func NewDefaultCase added in v0.0.13

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

func (*Case) Block added in v0.0.13

func (c *Case) Block() *Block

func (*Case) ExpressionNode added in v0.0.13

func (c *Case) ExpressionNode()

func (*Case) Expressions added in v0.0.13

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

func (*Case) IsDefault added in v0.0.13

func (c *Case) IsDefault() bool

func (*Case) Literal added in v0.0.13

func (c *Case) Literal() string

func (*Case) String added in v0.0.13

func (c *Case) String() string

func (*Case) Token added in v0.0.13

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

type Const added in v0.0.13

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

Const defines a named constant containing a constant value.

func NewConst added in v0.0.13

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

func (*Const) Literal added in v0.0.13

func (c *Const) Literal() string

func (*Const) StatementNode added in v0.0.13

func (c *Const) StatementNode()

func (*Const) String added in v0.0.13

func (c *Const) String() string

func (*Const) Token added in v0.0.13

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

func (*Const) Value added in v0.0.13

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

type Control added in v0.0.13

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

Control defines a return, break, or continue statement.

func NewControl added in v0.0.13

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

func (*Control) Literal added in v0.0.13

func (c *Control) Literal() string

func (*Control) StatementNode added in v0.0.13

func (c *Control) StatementNode()

func (*Control) String added in v0.0.13

func (c *Control) String() string

func (*Control) Token added in v0.0.13

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

func (*Control) Value added in v0.0.13

func (c *Control) Value() Expression

type Expression

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

Expression represents a snippet of Tamarin code that evaluates to a value. Expressions are used in statements, as well as in other expressions.

type Float added in v0.0.13

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

Float holds a floating point number

func NewFloat added in v0.0.13

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

func (*Float) ExpressionNode added in v0.0.13

func (f *Float) ExpressionNode()

func (*Float) Literal added in v0.0.13

func (f *Float) Literal() string

func (*Float) String added in v0.0.13

func (f *Float) String() string

func (*Float) Token added in v0.0.13

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

func (*Float) Value added in v0.0.13

func (f *Float) Value() float64

type For added in v0.0.13

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

For defines a for loop.

func NewFor added in v0.0.13

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

func NewSimpleFor added in v0.0.13

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

func (*For) Condition added in v0.0.13

func (f *For) Condition() Node

func (*For) Consequence added in v0.0.13

func (f *For) Consequence() *Block

func (*For) ExpressionNode added in v0.0.13

func (f *For) ExpressionNode()

Should be StatementNode only?

func (*For) Init added in v0.0.13

func (f *For) Init() Node

func (*For) IsIteratorLoop added in v0.0.13

func (f *For) IsIteratorLoop() bool

func (*For) IsSimpleLoop added in v0.0.13

func (f *For) IsSimpleLoop() bool

func (*For) Literal added in v0.0.13

func (f *For) Literal() string

func (*For) Post added in v0.0.13

func (f *For) Post() Expression

func (*For) String added in v0.0.13

func (f *For) String() string

func (*For) Token added in v0.0.13

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

type Func added in v0.0.13

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

Func holds a function definition.

func NewFunc added in v0.0.13

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

func (*Func) Body added in v0.0.13

func (f *Func) Body() *Block

func (*Func) Defaults added in v0.0.13

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

func (*Func) ExpressionNode added in v0.0.13

func (f *Func) ExpressionNode()

func (*Func) Literal added in v0.0.13

func (f *Func) Literal() string

func (*Func) Name added in v0.0.13

func (f *Func) Name() *Ident

func (*Func) Parameters added in v0.0.13

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

func (*Func) String added in v0.0.13

func (f *Func) String() string

func (*Func) Token added in v0.0.13

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

type GetAttr added in v0.0.13

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

GetAttr

func NewGetAttr added in v0.0.13

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

func (*GetAttr) ExpressionNode added in v0.0.13

func (e *GetAttr) ExpressionNode()

func (*GetAttr) Literal added in v0.0.13

func (e *GetAttr) Literal() string

func (*GetAttr) Name added in v0.0.13

func (e *GetAttr) Name() string

func (*GetAttr) Object added in v0.0.13

func (e *GetAttr) Object() Expression

func (*GetAttr) String added in v0.0.13

func (e *GetAttr) String() string

func (*GetAttr) Token added in v0.0.13

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

type Ident added in v0.0.13

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

Ident holds a single identifier.

func NewIdent added in v0.0.13

func NewIdent(token token.Token) *Ident

func (*Ident) ExpressionNode added in v0.0.13

func (i *Ident) ExpressionNode()

func (*Ident) Literal added in v0.0.13

func (i *Ident) Literal() string

func (*Ident) String added in v0.0.13

func (i *Ident) String() string

func (*Ident) Token added in v0.0.13

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

type If added in v0.0.13

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

If holds an if statement.

func NewIf added in v0.0.13

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

func (*If) Alternative added in v0.0.13

func (i *If) Alternative() *Block

func (*If) Condition added in v0.0.13

func (i *If) Condition() Expression

func (*If) Consequence added in v0.0.13

func (i *If) Consequence() *Block

func (*If) ExpressionNode added in v0.0.13

func (i *If) ExpressionNode()

func (*If) Literal added in v0.0.13

func (i *If) Literal() string

func (*If) String added in v0.0.13

func (i *If) String() string

func (*If) Token added in v0.0.13

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

type Import added in v0.0.13

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

Import holds an import statement

func NewImport added in v0.0.13

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

func (*Import) ExpressionNode added in v0.0.13

func (i *Import) ExpressionNode()

func (*Import) Literal added in v0.0.13

func (i *Import) Literal() string

func (*Import) Module added in v0.0.13

func (i *Import) Module() *Ident

func (*Import) String added in v0.0.13

func (i *Import) String() string

func (*Import) Token added in v0.0.13

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

type In added in v0.0.13

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

In holds an "in" expression

func NewIn added in v0.0.13

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

func (*In) ExpressionNode added in v0.0.13

func (i *In) ExpressionNode()

func (*In) Left added in v0.0.13

func (i *In) Left() Expression

func (*In) Literal added in v0.0.13

func (i *In) Literal() string

func (*In) Right added in v0.0.13

func (i *In) Right() Expression

func (*In) String added in v0.0.13

func (i *In) String() string

func (*In) Token added in v0.0.13

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

type Index added in v0.0.13

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

Index holds an index expression

func NewIndex added in v0.0.13

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

func (*Index) ExpressionNode added in v0.0.13

func (i *Index) ExpressionNode()

func (*Index) Index added in v0.0.13

func (i *Index) Index() Expression

func (*Index) Left added in v0.0.13

func (i *Index) Left() Expression

func (*Index) Literal added in v0.0.13

func (i *Index) Literal() string

func (*Index) String added in v0.0.13

func (i *Index) String() string

func (*Index) Token added in v0.0.13

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

type Infix added in v0.0.13

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

Infix defines an infix expression like "x + y" or "5 - 1".

func NewInfix added in v0.0.13

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

func (*Infix) ExpressionNode added in v0.0.13

func (i *Infix) ExpressionNode()

func (*Infix) Left added in v0.0.13

func (i *Infix) Left() Expression

func (*Infix) Literal added in v0.0.13

func (i *Infix) Literal() string

func (*Infix) Operator added in v0.0.13

func (i *Infix) Operator() string

func (*Infix) Right added in v0.0.13

func (i *Infix) Right() Expression

func (*Infix) String added in v0.0.13

func (i *Infix) String() string

func (*Infix) Token added in v0.0.13

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

type Int added in v0.0.13

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

Int holds an integer number

func NewInt added in v0.0.13

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

func (*Int) ExpressionNode added in v0.0.13

func (i *Int) ExpressionNode()

func (*Int) Literal added in v0.0.13

func (i *Int) Literal() string

func (*Int) String added in v0.0.13

func (i *Int) String() string

func (*Int) Token added in v0.0.13

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

func (*Int) Value added in v0.0.13

func (i *Int) Value() int64

type List added in v0.0.13

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

List holds an inline list

func NewList added in v0.0.13

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

func (*List) ExpressionNode added in v0.0.13

func (l *List) ExpressionNode()

func (*List) Items added in v0.0.13

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

func (*List) Literal added in v0.0.13

func (l *List) Literal() string

func (*List) String added in v0.0.13

func (l *List) String() string

func (*List) Token added in v0.0.13

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

type Map added in v0.0.13

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

Map holds a map

func NewMap added in v0.0.13

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

func (*Map) ExpressionNode added in v0.0.13

func (m *Map) ExpressionNode()

func (*Map) Items added in v0.0.13

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

func (*Map) Literal added in v0.0.13

func (m *Map) Literal() string

func (*Map) String added in v0.0.13

func (m *Map) String() string

func (*Map) Token added in v0.0.13

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

type MultiVar added in v0.0.13

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

MultiVar holds a variable assignment statement for >1 variables.

func NewMultiVar added in v0.0.13

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

func (*MultiVar) IsWalrus added in v0.0.13

func (s *MultiVar) IsWalrus() bool

func (*MultiVar) Literal added in v0.0.13

func (s *MultiVar) Literal() string

func (*MultiVar) StatementNode added in v0.0.13

func (s *MultiVar) StatementNode()

func (*MultiVar) String added in v0.0.13

func (s *MultiVar) String() string

func (*MultiVar) Token added in v0.0.13

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

func (*MultiVar) Value added in v0.0.13

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

type Nil added in v0.0.13

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

Nil represents a literal nil

func NewNil added in v0.0.13

func NewNil(token token.Token) *Nil

func (*Nil) ExpressionNode added in v0.0.13

func (n *Nil) ExpressionNode()

func (*Nil) Literal added in v0.0.13

func (n *Nil) Literal() string

func (*Nil) String added in v0.0.13

func (n *Nil) String() string

func (*Nil) Token added in v0.0.13

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
}

Node reresents a node.

type ObjectCall added in v0.0.13

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

ObjectCall is used when calling a method on an object.

func NewObjectCall added in v0.0.13

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

func (*ObjectCall) Call added in v0.0.13

func (c *ObjectCall) Call() Expression

func (*ObjectCall) ExpressionNode added in v0.0.13

func (c *ObjectCall) ExpressionNode()

func (*ObjectCall) Literal added in v0.0.13

func (c *ObjectCall) Literal() string

func (*ObjectCall) Object added in v0.0.13

func (c *ObjectCall) Object() Expression

func (*ObjectCall) String added in v0.0.13

func (c *ObjectCall) String() string

func (*ObjectCall) Token added in v0.0.13

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

type Pipe added in v0.0.13

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

Pipe holds a series of calls

func NewPipe added in v0.0.13

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

func (*Pipe) ExpressionNode added in v0.0.13

func (p *Pipe) ExpressionNode()

func (*Pipe) Expressions added in v0.0.13

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

func (*Pipe) Literal added in v0.0.13

func (p *Pipe) Literal() string

func (*Pipe) String added in v0.0.13

func (p *Pipe) String() string

func (*Pipe) Token added in v0.0.13

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

type Postfix added in v0.0.13

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

Postfix defines a postfix expression like "x++".

func NewPostfix added in v0.0.13

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

func (*Postfix) ExpressionNode added in v0.0.13

func (p *Postfix) ExpressionNode()

func (*Postfix) Literal added in v0.0.13

func (p *Postfix) Literal() string

func (*Postfix) Operator added in v0.0.13

func (p *Postfix) Operator() string

func (*Postfix) String added in v0.0.13

func (p *Postfix) String() string

func (*Postfix) Token added in v0.0.13

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

type Prefix added in v0.0.13

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

Prefix defines a prefix expression like "!false" or "-x".

func NewPrefix added in v0.0.13

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

func (*Prefix) ExpressionNode added in v0.0.13

func (p *Prefix) ExpressionNode()

func (*Prefix) Literal added in v0.0.13

func (p *Prefix) Literal() string

func (*Prefix) Operator added in v0.0.13

func (p *Prefix) Operator() string

func (*Prefix) Right added in v0.0.13

func (p *Prefix) Right() Expression

func (*Prefix) String added in v0.0.13

func (p *Prefix) String() string

func (*Prefix) Token added in v0.0.13

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

type Program

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

Program represents a complete program.

func NewProgram added in v0.0.13

func NewProgram(statements []Node) *Program

func (*Program) First added in v0.0.13

func (p *Program) First() Node

func (*Program) Literal added in v0.0.13

func (p *Program) Literal() string

func (*Program) Statements

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

func (*Program) String

func (p *Program) String() string

func (*Program) Token added in v0.0.13

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

type Range added in v0.0.13

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

Range is used to iterator over a container

func NewRange added in v0.0.13

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

func (*Range) Container added in v0.0.13

func (r *Range) Container() Expression

func (*Range) ExpressionNode added in v0.0.13

func (r *Range) ExpressionNode()

func (*Range) Literal added in v0.0.13

func (r *Range) Literal() string

func (*Range) String added in v0.0.13

func (r *Range) String() string

func (*Range) Token added in v0.0.13

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

type Set added in v0.0.13

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

Set holds a set definition

func NewSet added in v0.0.13

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

func (*Set) ExpressionNode added in v0.0.13

func (s *Set) ExpressionNode()

func (*Set) Items added in v0.0.13

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

func (*Set) Literal added in v0.0.13

func (s *Set) Literal() string

func (*Set) String added in v0.0.13

func (s *Set) String() string

func (*Set) Token added in v0.0.13

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

type Slice added in v0.0.13

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

Index holds an index expression

func NewSlice added in v0.0.13

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

func (*Slice) ExpressionNode added in v0.0.13

func (i *Slice) ExpressionNode()

func (*Slice) FromIndex added in v0.0.13

func (i *Slice) FromIndex() Expression

func (*Slice) Left added in v0.0.13

func (i *Slice) Left() Expression

func (*Slice) Literal added in v0.0.13

func (i *Slice) Literal() string

func (*Slice) String added in v0.0.13

func (i *Slice) String() string

func (*Slice) ToIndex added in v0.0.13

func (i *Slice) ToIndex() Expression

func (*Slice) Token added in v0.0.13

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

type Statement

type Statement Node

type String added in v0.0.13

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

String holds a string

func NewString added in v0.0.13

func NewString(tok token.Token) *String

func NewTemplatedString added in v0.0.13

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

func (*String) ExpressionNode added in v0.0.13

func (s *String) ExpressionNode()

func (*String) Literal added in v0.0.13

func (s *String) Literal() string

func (*String) String added in v0.0.13

func (s *String) String() string

func (*String) Template added in v0.0.13

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

func (*String) TemplateExpressions added in v0.0.13

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

func (*String) Token added in v0.0.13

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

func (*String) Value added in v0.0.13

func (s *String) Value() string

type Switch added in v0.0.13

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

Switch represents a switch statement and its cases

func NewSwitch added in v0.0.13

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

func (*Switch) Choices added in v0.0.13

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

func (*Switch) ExpressionNode added in v0.0.13

func (s *Switch) ExpressionNode()

func (*Switch) Literal added in v0.0.13

func (s *Switch) Literal() string

func (*Switch) String added in v0.0.13

func (s *Switch) String() string

func (*Switch) Token added in v0.0.13

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

func (*Switch) Value added in v0.0.13

func (s *Switch) Value() Expression

type Ternary added in v0.0.13

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

Ternary holds a ternary expression.

func NewTernary added in v0.0.13

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

func (*Ternary) Condition added in v0.0.13

func (t *Ternary) Condition() Expression

func (*Ternary) ExpressionNode added in v0.0.13

func (t *Ternary) ExpressionNode()

func (*Ternary) IfFalse added in v0.0.13

func (t *Ternary) IfFalse() Expression

func (*Ternary) IfTrue added in v0.0.13

func (t *Ternary) IfTrue() Expression

func (*Ternary) Literal added in v0.0.13

func (t *Ternary) Literal() string

func (*Ternary) String added in v0.0.13

func (t *Ternary) String() string

func (*Ternary) Token added in v0.0.13

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

type Var added in v0.0.13

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

Var holds a variable declaration statement.

func NewDeclaration added in v0.0.13

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

func NewVar added in v0.0.13

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

func (*Var) IsWalrus added in v0.0.13

func (s *Var) IsWalrus() bool

func (*Var) Literal added in v0.0.13

func (s *Var) Literal() string

func (*Var) StatementNode added in v0.0.13

func (s *Var) StatementNode()

func (*Var) String added in v0.0.13

func (s *Var) String() string

func (*Var) Token added in v0.0.13

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

func (*Var) Value added in v0.0.13

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

Jump to

Keyboard shortcuts

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