Documentation
¶
Index ¶
- type ArrayLiteral
- type BlockStatement
- type Boolean
- type CallExpression
- type CharLiteral
- type Expression
- type ExpressionStatement
- type FloatLiteral
- 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 ArrayLiteral ¶
type ArrayLiteral struct {
Token token.Token
Elements []Expression
}
array
func (*ArrayLiteral) String ¶
func (al *ArrayLiteral) String() string
func (*ArrayLiteral) TokenLiteral ¶
func (al *ArrayLiteral) TokenLiteral() string
type 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
Function Expression
Arguments []Expression
}
call expression
func (*CallExpression) String ¶
func (ce *CallExpression) String() string
func (*CallExpression) TokenLiteral ¶
func (ce *CallExpression) TokenLiteral() string
type CharLiteral ¶
char
func (*CharLiteral) String ¶
func (sl *CharLiteral) String() string
func (*CharLiteral) TokenLiteral ¶
func (sl *CharLiteral) TokenLiteral() string
type Expression ¶
type Expression interface {
Node // TokenLiteral and String()
// contains filtered or unexported methods
}
type ExpressionStatement ¶
type ExpressionStatement struct {
Token token.Token
Expression Expression
}
func (*ExpressionStatement) String ¶
func (i *ExpressionStatement) String() string
func (*ExpressionStatement) TokenLiteral ¶
func (i *ExpressionStatement) TokenLiteral() string
type FloatLiteral ¶
float
func (*FloatLiteral) String ¶
func (sl *FloatLiteral) String() string
func (*FloatLiteral) TokenLiteral ¶
func (sl *FloatLiteral) TokenLiteral() string
type FunctionLiteral ¶
type FunctionLiteral struct {
Token token.Token
Parameters []*Identifier
Body BlockStatement
}
function
func (*FunctionLiteral) String ¶
func (fl *FunctionLiteral) String() string
func (*FunctionLiteral) TokenLiteral ¶
func (fl *FunctionLiteral) TokenLiteral() string
type HashLiteral ¶
type HashLiteral struct {
Token token.Token
Pairs map[Expression]Expression
}
hash literal
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
Condition Expression
Consequence *BlockStatement
Alternative *BlockStatement
}
if expression
func (*IfExpression) String ¶
func (i *IfExpression) String() string
func (*IfExpression) TokenLiteral ¶
func (i *IfExpression) TokenLiteral() string
type IndexExpression ¶
type IndexExpression struct {
Token token.Token //[
Left Expression
Index Expression
}
array index expression
func (*IndexExpression) String ¶
func (ie *IndexExpression) String() string
func (*IndexExpression) TokenLiteral ¶
func (ie *IndexExpression) TokenLiteral() string
type InfixExpression ¶
type InfixExpression struct {
Token token.Token
Left Expression
Right Expression
Operator string
}
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
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 {
Token token.Token
Operator string
Right Expression
}
func (*PrefixExpression) String ¶
func (i *PrefixExpression) String() string
func (*PrefixExpression) TokenLiteral ¶
func (i *PrefixExpression) TokenLiteral() string
type ReturnStatement ¶
type ReturnStatement struct {
Token token.Token
ReturnValue Expression
}
func (*ReturnStatement) String ¶
func (i *ReturnStatement) String() string
func (*ReturnStatement) TokenLiteral ¶
func (i *ReturnStatement) TokenLiteral() string
type StringLiteral ¶
strings
func (*StringLiteral) String ¶
func (sl *StringLiteral) String() string
func (*StringLiteral) TokenLiteral ¶
func (sl *StringLiteral) TokenLiteral() string
Click to show internal directories.
Click to hide internal directories.