Documentation ¶
Index ¶
- type ArrayLiteral
- type AssignStatement
- type BlockStatement
- type Boolean
- type CallExpression
- type Expression
- type ExpressionStatement
- type FunctionLiteral
- type HashMapLiteral
- type Ident
- type IfExpression
- type IndexExpression
- type InfixExpression
- type IntegerLiteral
- 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) ToString ¶
func (al *ArrayLiteral) ToString() string
func (*ArrayLiteral) TokenLiteral ¶
func (al *ArrayLiteral) TokenLiteral() string
type AssignStatement ¶
type AssignStatement struct { Name *Ident Value Expression }
Statements
func (*AssignStatement) ToString ¶
func (as *AssignStatement) ToString() string
func (*AssignStatement) TokenLiteral ¶
func (as *AssignStatement) TokenLiteral() string
type BlockStatement ¶
func (*BlockStatement) ToString ¶
func (bs *BlockStatement) ToString() string
func (*BlockStatement) TokenLiteral ¶
func (bs *BlockStatement) TokenLiteral() string
type Boolean ¶
func (*Boolean) TokenLiteral ¶
type CallExpression ¶
type CallExpression struct { Token token.Token // '(' Function Expression // Ident Arguments []Expression }
func (*CallExpression) ToString ¶
func (ce *CallExpression) ToString() string
func (*CallExpression) TokenLiteral ¶
func (ce *CallExpression) TokenLiteral() string
type Expression ¶
type Expression interface { Node // contains filtered or unexported methods }
All expression nodes implement
type ExpressionStatement ¶
type ExpressionStatement struct { Token token.Token Expression Expression }
func (*ExpressionStatement) ToString ¶
func (es *ExpressionStatement) ToString() string
func (*ExpressionStatement) TokenLiteral ¶
func (es *ExpressionStatement) TokenLiteral() string
type FunctionLiteral ¶
type FunctionLiteral struct { Token token.Token // 'fn' Parameters []*Ident Body *BlockStatement }
func (*FunctionLiteral) ToString ¶
func (fl *FunctionLiteral) ToString() string
func (*FunctionLiteral) TokenLiteral ¶
func (fl *FunctionLiteral) TokenLiteral() string
type HashMapLiteral ¶
type HashMapLiteral struct { Token token.Token // { Pairs map[Expression]Expression }
func (*HashMapLiteral) ToString ¶
func (hl *HashMapLiteral) ToString() string
func (*HashMapLiteral) TokenLiteral ¶
func (hl *HashMapLiteral) TokenLiteral() string
type Ident ¶
func (*Ident) TokenLiteral ¶
type IfExpression ¶
type IfExpression struct { Token token.Token // if Condition Expression Consequence *BlockStatement Alternative *BlockStatement }
func (*IfExpression) ToString ¶
func (ie *IfExpression) ToString() string
func (*IfExpression) TokenLiteral ¶
func (ie *IfExpression) TokenLiteral() string
type IndexExpression ¶
type IndexExpression struct { Token token.Token // [ Left Expression Index Expression }
func (*IndexExpression) ToString ¶
func (ie *IndexExpression) ToString() string
func (*IndexExpression) TokenLiteral ¶
func (ie *IndexExpression) TokenLiteral() string
type InfixExpression ¶
type InfixExpression struct { Token token.Token // +, -, etc Left Expression Operator string Right Expression }
func (*InfixExpression) ToString ¶
func (oe *InfixExpression) ToString() string
func (*InfixExpression) TokenLiteral ¶
func (oe *InfixExpression) TokenLiteral() string
type IntegerLiteral ¶
Expressions
func (*IntegerLiteral) ToString ¶
func (il *IntegerLiteral) ToString() string
func (*IntegerLiteral) TokenLiteral ¶
func (il *IntegerLiteral) TokenLiteral() string
type PrefixExpression ¶
type PrefixExpression struct { Token token.Token // ! Operator string Right Expression }
func (*PrefixExpression) ToString ¶
func (pe *PrefixExpression) ToString() string
func (*PrefixExpression) TokenLiteral ¶
func (pe *PrefixExpression) TokenLiteral() string
type ReturnStatement ¶
type ReturnStatement struct { Token token.Token // return Value Expression }
func (*ReturnStatement) ToString ¶
func (rs *ReturnStatement) ToString() string
func (*ReturnStatement) TokenLiteral ¶
func (rs *ReturnStatement) TokenLiteral() string
type Statement ¶
type Statement interface { Node // contains filtered or unexported methods }
All statement nodes implement
type StringLiteral ¶
func (*StringLiteral) ToString ¶
func (sl *StringLiteral) ToString() string
func (*StringLiteral) TokenLiteral ¶
func (sl *StringLiteral) TokenLiteral() string
Click to show internal directories.
Click to hide internal directories.