ast

package
v0.0.0-...-f512efc Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2019 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayLiteral

type ArrayLiteral struct {
	Elements []Expression
}

func (*ArrayLiteral) String

func (al *ArrayLiteral) String() string

type AssignStatement

type AssignStatement struct {
	Name  *Identifier
	Value Expression
}

func (*AssignStatement) String

func (as *AssignStatement) String() string

type BlockStatement

type BlockStatement struct {
	Statements []Statement
	Ident      int
}

func (*BlockStatement) String

func (bs *BlockStatement) String() string

type Boolean

type Boolean struct {
	Value bool
}

func (*Boolean) String

func (b *Boolean) String() string

type BreakStatement

type BreakStatement struct{}

func (*BreakStatement) String

func (bs *BreakStatement) String() string

type CallExpression

type CallExpression struct {
	Function  Expression
	Arguments []Expression
}

func (*CallExpression) String

func (ce *CallExpression) String() string

type ContinueStatement

type ContinueStatement struct{}

func (*ContinueStatement) String

func (cs *ContinueStatement) String() string

type Expression

type Expression interface {
	Node
	// contains filtered or unexported methods
}

type ExpressionStatement

type ExpressionStatement struct {
	Expression Expression
}

func (*ExpressionStatement) String

func (es *ExpressionStatement) String() string

type FunctionLiteral

type FunctionLiteral struct {
	Parameters []*Identifier
	Body       *BlockStatement
}

func (*FunctionLiteral) String

func (fl *FunctionLiteral) String() string

type Identifier

type Identifier struct {
	Value string
}

func (*Identifier) String

func (i *Identifier) String() string

type IfExpression

type IfExpression struct {
	Condition   Expression
	Consequence *BlockStatement
	Alternative *BlockStatement
}

func (*IfExpression) String

func (ie *IfExpression) String() string

type IndexExpression

type IndexExpression struct {
	Left  Expression
	Index Expression
}

func (*IndexExpression) String

func (ie *IndexExpression) String() string

type InfixExpression

type InfixExpression struct {
	Left     Expression
	Operator string
	Right    Expression
}

func (*InfixExpression) String

func (ie *InfixExpression) String() string

type IntegerLiteral

type IntegerLiteral struct {
	Value int64
}

func (*IntegerLiteral) String

func (il *IntegerLiteral) String() string

type MacroLiteral

type MacroLiteral struct {
	Parameters []*Identifier
	Body       *BlockStatement
}

func (*MacroLiteral) String

func (ml *MacroLiteral) String() string

type MapLiteral

type MapLiteral struct {
	Pairs map[Expression]Expression
}

func (*MapLiteral) String

func (ml *MapLiteral) String() string

type ModifierFunc

type ModifierFunc func(Node) Node

type Node

type Node interface {
	String() string
}

func Modify

func Modify(node Node, modifier ModifierFunc) Node

type PrefixExpression

type PrefixExpression struct {
	Operator string
	Right    Expression
}

func (*PrefixExpression) String

func (pe *PrefixExpression) String() string

type Program

type Program struct {
	Statements []Statement
}

func (*Program) String

func (p *Program) String() string

type ReturnStatement

type ReturnStatement struct {
	ReturnValue Expression
}

func (*ReturnStatement) String

func (rs *ReturnStatement) String() string

type Statement

type Statement interface {
	Node
	// contains filtered or unexported methods
}

type StringLiteral

type StringLiteral struct {
	Value string
}

func (*StringLiteral) PureString

func (sl *StringLiteral) PureString() string

func (*StringLiteral) String

func (sl *StringLiteral) String() string

type WhileStatement

type WhileStatement struct {
	Condition Expression
	Body      *BlockStatement
}

func (*WhileStatement) String

func (ws *WhileStatement) String() string

Jump to

Keyboard shortcuts

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