Documentation ¶
Index ¶
- type ArrayLiteral
- type AssignStatement
- type BlockStatement
- type Boolean
- type BreakStatement
- type CallExpression
- type ContinueStatement
- type Expression
- type ExpressionStatement
- type FunctionLiteral
- type Identifier
- type IfExpression
- type IndexExpression
- type InfixExpression
- type IntegerLiteral
- type MacroLiteral
- type MapLiteral
- type ModifierFunc
- type Node
- type PrefixExpression
- type Program
- type ReturnStatement
- type Statement
- type StringLiteral
- type WhileStatement
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 ¶
func (*BlockStatement) String ¶
func (bs *BlockStatement) 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 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 ReturnStatement ¶
type ReturnStatement struct {
ReturnValue Expression
}
func (*ReturnStatement) String ¶
func (rs *ReturnStatement) String() string
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
Click to show internal directories.
Click to hide internal directories.