Documentation ¶
Index ¶
- type ArrayLiteral
- type AssignStatement
- type BlockStatement
- type Boolean
- type CallExpression
- type ConstStatement
- type Expression
- type ExpressionStatement
- type FunctionLiteral
- type HashLiteral
- type Identifier
- type IfExpression
- type IndexExpression
- type InfixExpression
- type IntegerLiteral
- type LetStatement
- type Node
- type PostfixExpression
- type PrefixExpression
- type Program
- type ReturnStatement
- type Statement
- type StringLiteral
- type WhileLoopExpression
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayLiteral ¶
type ArrayLiteral struct { Token token.Token // token.Array Elements []Expression }
** ArrayLiteral
func (*ArrayLiteral) String ¶
func (al *ArrayLiteral) String() string
func (*ArrayLiteral) TokenLiteral ¶
func (al *ArrayLiteral) TokenLiteral() string
type AssignStatement ¶
type AssignStatement struct { Token token.Token Name *Identifier Operator string Value Expression }
** AssignStatement
func (*AssignStatement) String ¶
func (as *AssignStatement) String() string
func (*AssignStatement) TokenLiteral ¶
func (as *AssignStatement) TokenLiteral() string
type BlockStatement ¶
** BlockStatement
func (*BlockStatement) String ¶
func (bs *BlockStatement) String() string
func (*BlockStatement) TokenLiteral ¶
func (bs *BlockStatement) TokenLiteral() string
type CallExpression ¶
type CallExpression struct { Token token.Token // The '(' token Function Expression Arguments []Expression }
** CallExpression
func (*CallExpression) String ¶
func (ce *CallExpression) String() string
func (*CallExpression) TokenLiteral ¶
func (ce *CallExpression) TokenLiteral() string
type ConstStatement ¶
type ConstStatement struct { Token token.Token // token.CONST Name *Identifier Value Expression }
** ConstStatement
func (*ConstStatement) String ¶
func (ls *ConstStatement) String() string
func (*ConstStatement) TokenLiteral ¶
func (ls *ConstStatement) TokenLiteral() string
type Expression ¶
type Expression interface { Node // contains filtered or unexported methods }
type ExpressionStatement ¶
type ExpressionStatement struct { Token token.Token // the first token of the expression Expression Expression }
** ExpressionStatement
func (*ExpressionStatement) String ¶
func (es *ExpressionStatement) String() string
func (*ExpressionStatement) TokenLiteral ¶
func (es *ExpressionStatement) TokenLiteral() string
type FunctionLiteral ¶
type FunctionLiteral struct { Token token.Token // The 'function' token Parameters []*Identifier Defaults map[string]Expression Body *BlockStatement Name string Define bool }
** FunctionLiteral
func (*FunctionLiteral) String ¶
func (fl *FunctionLiteral) String() string
func (*FunctionLiteral) TokenLiteral ¶
func (fl *FunctionLiteral) TokenLiteral() string
type HashLiteral ¶
type HashLiteral struct { Token token.Token // the '{' token Pairs map[Expression]Expression }
** HashLiteral
func (*HashLiteral) String ¶
func (hl *HashLiteral) String() string
func (*HashLiteral) TokenLiteral ¶
func (hl *HashLiteral) TokenLiteral() string
type Identifier ¶
** Identifier
func (*Identifier) String ¶
func (i *Identifier) String() string
func (*Identifier) TokenLiteral ¶
func (i *Identifier) TokenLiteral() string
type IfExpression ¶
type IfExpression struct { Token token.Token // The 'if' token Condition Expression Consequence *BlockStatement Alternative *BlockStatement }
** IfExpression
func (*IfExpression) String ¶
func (ie *IfExpression) String() string
func (*IfExpression) TokenLiteral ¶
func (ie *IfExpression) TokenLiteral() string
type IndexExpression ¶
type IndexExpression struct { Token token.Token // Then '[' token Left Expression Index Expression }
** IndexExpression
func (*IndexExpression) String ¶
func (ie *IndexExpression) String() string
func (*IndexExpression) TokenLiteral ¶
func (ie *IndexExpression) TokenLiteral() string
type InfixExpression ¶
type InfixExpression struct { Token token.Token // Infix tokens e.g +, -, ==, < Left Expression Operator string Right Expression }
** InfixExpression
func (*InfixExpression) String ¶
func (ie *InfixExpression) String() string
func (*InfixExpression) TokenLiteral ¶
func (ie *InfixExpression) TokenLiteral() string
type IntegerLiteral ¶
** IntegerLiteral
func (*IntegerLiteral) String ¶
func (il *IntegerLiteral) String() string
func (*IntegerLiteral) TokenLiteral ¶
func (il *IntegerLiteral) TokenLiteral() string
type LetStatement ¶
type LetStatement struct { Token token.Token // token.LET Name *Identifier Value Expression }
** LetStatement
func (*LetStatement) String ¶
func (ls *LetStatement) String() string
func (*LetStatement) TokenLiteral ¶
func (ls *LetStatement) TokenLiteral() string
type PostfixExpression ¶
type PostfixExpression struct { Token token.Token Operator string Name *Identifier }
** PostfixExpression
func (*PostfixExpression) String ¶
func (pe *PostfixExpression) String() string
func (*PostfixExpression) TokenLiteral ¶
func (pe *PostfixExpression) TokenLiteral() string
type PrefixExpression ¶
type PrefixExpression struct { Token token.Token // Prefix tokens e.g ! or - Operator string Right Expression }
** PrefixExpression
func (*PrefixExpression) String ¶
func (pe *PrefixExpression) String() string
func (*PrefixExpression) TokenLiteral ¶
func (pe *PrefixExpression) TokenLiteral() string
type Program ¶
type Program struct {
Statements []Statement
}
** Program
func (*Program) TokenLiteral ¶
type ReturnStatement ¶
type ReturnStatement struct { Token token.Token // token.RETURN ReturnValue Expression }
** ReturnStatement
func (*ReturnStatement) String ¶
func (rs *ReturnStatement) String() string
func (*ReturnStatement) TokenLiteral ¶
func (rs *ReturnStatement) TokenLiteral() string
type StringLiteral ¶
** StringLiteral
func (*StringLiteral) String ¶
func (sl *StringLiteral) String() string
func (*StringLiteral) TokenLiteral ¶
func (sl *StringLiteral) TokenLiteral() string
type WhileLoopExpression ¶
type WhileLoopExpression struct { Token token.Token // The 'while' token Condition Expression Consequence *BlockStatement }
** WhileLoopExpression
func (*WhileLoopExpression) String ¶
func (ie *WhileLoopExpression) String() string
func (*WhileLoopExpression) TokenLiteral ¶
func (ie *WhileLoopExpression) TokenLiteral() string
Click to show internal directories.
Click to hide internal directories.