Documentation ¶
Index ¶
- type ArrayLiteral
- type BlockStatement
- type Boolean
- type CallExpression
- type Expression
- type ExpressionStatement
- type FunctionLiteral
- type HashLiteral
- type Identifer
- 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 }
func (*ArrayLiteral) MarshalJSON ¶
func (al *ArrayLiteral) MarshalJSON() ([]byte, error)
func (*ArrayLiteral) String ¶
func (al *ArrayLiteral) String() string
func (*ArrayLiteral) TokenLiteral ¶
func (al *ArrayLiteral) TokenLiteral() string
type BlockStatement ¶
func (*BlockStatement) MarshalJSON ¶
func (bs *BlockStatement) MarshalJSON() ([]byte, error)
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 }
func (*CallExpression) MarshalJSON ¶
func (ce *CallExpression) MarshalJSON() ([]byte, error)
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 Expression Expression }
func (*ExpressionStatement) MarshalJSON ¶
func (es *ExpressionStatement) MarshalJSON() ([]byte, error)
func (*ExpressionStatement) String ¶
func (es *ExpressionStatement) String() string
func (*ExpressionStatement) TokenLiteral ¶
func (es *ExpressionStatement) TokenLiteral() string
type FunctionLiteral ¶
type FunctionLiteral struct { Token token.Token Patameters []*Identifer Body *BlockStatement }
func (*FunctionLiteral) MarshalJSON ¶
func (f *FunctionLiteral) MarshalJSON() ([]byte, error)
func (*FunctionLiteral) String ¶
func (f *FunctionLiteral) String() string
func (*FunctionLiteral) TokenLiteral ¶
func (f *FunctionLiteral) TokenLiteral() string
type HashLiteral ¶
type HashLiteral struct { Token token.Token Pairs map[Expression]Expression }
func (*HashLiteral) MarshalJSON ¶
func (hl *HashLiteral) MarshalJSON() ([]byte, error)
func (*HashLiteral) String ¶
func (hl *HashLiteral) String() string
func (*HashLiteral) TokenLiteral ¶
func (hl *HashLiteral) TokenLiteral() string
type IfExpression ¶
type IfExpression struct { Token token.Token Condition Expression Consequence *BlockStatement Alternative *BlockStatement }
func (*IfExpression) MarshalJSON ¶
func (ie *IfExpression) MarshalJSON() ([]byte, error)
func (*IfExpression) String ¶
func (ie *IfExpression) String() string
func (*IfExpression) TokenLiteral ¶
func (ie *IfExpression) TokenLiteral() string
type IndexExpression ¶
type IndexExpression struct { Token token.Token Left Expression Index Expression }
func (*IndexExpression) MarshalJSON ¶
func (ie *IndexExpression) MarshalJSON() ([]byte, error)
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 Operator string Right Expression }
func (*InfixExpression) MarshalJSON ¶
func (ie *InfixExpression) MarshalJSON() ([]byte, error)
func (*InfixExpression) String ¶
func (ie *InfixExpression) String() string
func (*InfixExpression) TokenLiteral ¶
func (ie *InfixExpression) TokenLiteral() string
type IntegerLiteral ¶
func (*IntegerLiteral) MarshalJSON ¶
func (i *IntegerLiteral) MarshalJSON() ([]byte, error)
func (*IntegerLiteral) String ¶
func (i *IntegerLiteral) String() string
func (*IntegerLiteral) TokenLiteral ¶
func (i *IntegerLiteral) TokenLiteral() string
type LetStatement ¶
type LetStatement struct { Token token.Token // LET Name *Identifer Value Expression }
func (*LetStatement) MarshalJSON ¶
func (l *LetStatement) MarshalJSON() ([]byte, error)
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) MarshalJSON ¶
func (pe *PrefixExpression) MarshalJSON() ([]byte, error)
func (*PrefixExpression) String ¶
func (pe *PrefixExpression) String() string
func (*PrefixExpression) TokenLiteral ¶
func (pe *PrefixExpression) TokenLiteral() string
type Program ¶
type Program struct {
Statements []Statement
}
func (*Program) MarshalJSON ¶
func (*Program) TokenLiteral ¶
type ReturnStatement ¶
type ReturnStatement struct { Token token.Token // RETURN ReturnValue Expression }
func (*ReturnStatement) MarshalJSON ¶
func (rs *ReturnStatement) MarshalJSON() ([]byte, error)
func (*ReturnStatement) String ¶
func (rs *ReturnStatement) String() string
func (*ReturnStatement) TokenLiteral ¶
func (rs *ReturnStatement) TokenLiteral() string
type StringLiteral ¶
func (*StringLiteral) MarshalJSON ¶
func (sl *StringLiteral) MarshalJSON() ([]byte, error)
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.