Documentation ¶
Index ¶
- type ArrayLiteral
- type BlockStatement
- type Boolean
- type CallExpression
- type Expression
- type ExpressionStatement
- type FunctionLiteral
- type HashLiteral
- type Identifier
- type IfExpression
- type IndexExpression
- type InfixExpression
- type IntegerLiteral
- type LetStatement
- type Node
- type PrefixExpression
- type Program
- type ReturnStatement
- type Statement
- type StringLiteral
- type WhileExpression
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayLiteral ¶
type ArrayLiteral struct { Token token.Token // the '[' token Elements []Expression }
func (*ArrayLiteral) String ¶
func (al *ArrayLiteral) String() string
func (*ArrayLiteral) TokenLiteral ¶
func (al *ArrayLiteral) TokenLiteral() string
type BlockStatement ¶
func (*BlockStatement) String ¶
func (b *BlockStatement) String() string
func (*BlockStatement) TokenLiteral ¶
func (b *BlockStatement) TokenLiteral() string
type Boolean ¶
func (*Boolean) TokenLiteral ¶
type CallExpression ¶
type CallExpression struct { Token token.Token // the '(' token Function Expression Arguments []Expression }
func (*CallExpression) String ¶
func (ce *CallExpression) String() string
func (*CallExpression) TokenLiteral ¶
func (ce *CallExpression) TokenLiteral() string
type Expression ¶
type Expression interface { Node // contains filtered or unexported methods }
type ExpressionStatement ¶
type ExpressionStatement struct { // the first token of the expression Token token.Token Expression Expression }
func (*ExpressionStatement) String ¶
func (ex *ExpressionStatement) String() string
func (*ExpressionStatement) TokenLiteral ¶
func (ex *ExpressionStatement) TokenLiteral() string
type FunctionLiteral ¶
type FunctionLiteral struct { Token token.Token // the 'fn' token Parameters []*Identifier Body *BlockStatement }
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 }
func (*HashLiteral) String ¶
func (hl *HashLiteral) String() string
func (*HashLiteral) TokenLiteral ¶
func (hl *HashLiteral) TokenLiteral() string
type 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 }
func (*IfExpression) String ¶
func (ix *IfExpression) String() string
func (*IfExpression) TokenLiteral ¶
func (ix *IfExpression) TokenLiteral() string
type IndexExpression ¶
type IndexExpression struct { Token token.Token // the [ token Left Expression Index Expression }
func (*IndexExpression) String ¶
func (ie *IndexExpression) String() string
func (*IndexExpression) TokenLiteral ¶
func (ie *IndexExpression) TokenLiteral() string
type InfixExpression ¶
type InfixExpression struct { // The operator token, e.g. + Token token.Token Operator string Right Expression Left Expression }
func (*InfixExpression) String ¶
func (ix *InfixExpression) String() string
func (*InfixExpression) TokenLiteral ¶
func (ix *InfixExpression) TokenLiteral() string
type IntegerLiteral ¶
func (*IntegerLiteral) String ¶
func (i *IntegerLiteral) String() string
func (*IntegerLiteral) TokenLiteral ¶
func (i *IntegerLiteral) TokenLiteral() string
type LetStatement ¶
type LetStatement struct { Token token.Token // the token.LET token Name *Identifier Value Expression }
func (*LetStatement) String ¶
func (ls *LetStatement) String() string
func (*LetStatement) TokenLiteral ¶
func (ls *LetStatement) TokenLiteral() string
type PrefixExpression ¶
type PrefixExpression struct { // the prefix token, e.g ! Token token.Token Operator string Right Expression }
func (*PrefixExpression) String ¶
func (px *PrefixExpression) String() string
func (*PrefixExpression) TokenLiteral ¶
func (px *PrefixExpression) TokenLiteral() string
type ReturnStatement ¶
type ReturnStatement struct { // 'return' Token Token token.Token ReturnValue Expression }
func (*ReturnStatement) String ¶
func (r *ReturnStatement) String() string
func (*ReturnStatement) TokenLiteral ¶
func (r *ReturnStatement) TokenLiteral() string
type StringLiteral ¶
func (*StringLiteral) String ¶
func (s *StringLiteral) String() string
func (*StringLiteral) TokenLiteral ¶
func (s *StringLiteral) TokenLiteral() string
type WhileExpression ¶
type WhileExpression struct { Token token.Token // the 'while' token Condition Expression Consequence *BlockStatement }
func (*WhileExpression) String ¶
func (we *WhileExpression) String() string
func (*WhileExpression) TokenLiteral ¶
func (we *WhileExpression) TokenLiteral() string
Click to show internal directories.
Click to hide internal directories.