Documentation
¶
Index ¶
- type Array
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array struct {
Token token.Token // The [ token
Elements []Expression
}
func (*Array) TokenLiteral ¶
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 fn 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 {
Token token.Token // The first token of the statement
Expression Expression
}
func (*ExpressionStatement) String ¶
func (e *ExpressionStatement) String() string
func (*ExpressionStatement) TokenLiteral ¶
func (e *ExpressionStatement) TokenLiteral() string
type FunctionLiteral ¶
type FunctionLiteral struct {
Token token.Token // The fn token
Parameters []*Identifier
Body *BlockStatement
}
func (*FunctionLiteral) String ¶
func (f *FunctionLiteral) String() string
func (*FunctionLiteral) TokenLiteral ¶
func (f *FunctionLiteral) TokenLiteral() string
type HashLiteral ¶
type HashLiteral struct {
Token token.Token // The { token
Pairs map[Expression]Expression
}
func (*HashLiteral) String ¶
func (h *HashLiteral) String() string
func (*HashLiteral) TokenLiteral ¶
func (h *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 (i *IfExpression) String() string
func (*IfExpression) TokenLiteral ¶
func (i *IfExpression) TokenLiteral() string
type IndexExpression ¶
type IndexExpression struct {
Token token.Token // The token.LBRACKET token
Left Expression
Index Expression
}
func (*IndexExpression) String ¶
func (i *IndexExpression) String() string
func (*IndexExpression) TokenLiteral ¶
func (i *IndexExpression) TokenLiteral() string
type InfixExpression ¶
type InfixExpression struct {
Token token.Token
Operator string
Right Expression
Left Expression
}
func (*InfixExpression) String ¶
func (i *InfixExpression) String() string
func (*InfixExpression) TokenLiteral ¶
func (i *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 (l *LetStatement) String() string
func (*LetStatement) TokenLiteral ¶
func (l *LetStatement) TokenLiteral() string
type PrefixExpression ¶
type PrefixExpression struct {
Token token.Token
Operator string
Right Expression
}
func (*PrefixExpression) String ¶
func (p *PrefixExpression) String() string
func (*PrefixExpression) TokenLiteral ¶
func (p *PrefixExpression) TokenLiteral() string
type ReturnStatement ¶
type ReturnStatement struct {
Token token.Token // The token.RETURN token
Value 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
Click to show internal directories.
Click to hide internal directories.