Documentation ¶
Index ¶
- type ArrayLiteral
- type AssignExpression
- type BlockStatement
- type BooleanLiteral
- type BreakStatement
- type CallExpression
- type ContinueStatement
- type Expression
- type ExpressionStatement
- type FloatLiteral
- type ForStatement
- 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 TryStatement
- type WhileStatement
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) String ¶
func (arrayLiteral *ArrayLiteral) String() string
func (*ArrayLiteral) TokenLiteral ¶
func (arrayLiteral *ArrayLiteral) TokenLiteral() string
type AssignExpression ¶
type AssignExpression struct { Token token.Token Variable *Identifier Value Expression }
func (*AssignExpression) String ¶
func (assignExpression *AssignExpression) String() string
func (*AssignExpression) TokenLiteral ¶
func (assignExpression *AssignExpression) TokenLiteral() string
type BlockStatement ¶
func (*BlockStatement) String ¶
func (blockStatement *BlockStatement) String() string
func (*BlockStatement) TokenLiteral ¶
func (blockStatement *BlockStatement) TokenLiteral() string
type BooleanLiteral ¶
func (*BooleanLiteral) String ¶
func (booleanLiteral *BooleanLiteral) String() string
func (*BooleanLiteral) TokenLiteral ¶
func (booleanLiteral *BooleanLiteral) TokenLiteral() string
type BreakStatement ¶
func (*BreakStatement) String ¶
func (breakStatement *BreakStatement) String() string
func (*BreakStatement) TokenLiteral ¶
func (breakStatement *BreakStatement) TokenLiteral() string
type CallExpression ¶
type CallExpression struct { Token token.Token Function Expression Arguments []Expression }
func (*CallExpression) String ¶
func (callExpression *CallExpression) String() string
func (*CallExpression) TokenLiteral ¶
func (callExpression *CallExpression) TokenLiteral() string
type ContinueStatement ¶
func (*ContinueStatement) String ¶
func (continueStatement *ContinueStatement) String() string
func (*ContinueStatement) TokenLiteral ¶
func (continueStatement *ContinueStatement) 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) String ¶
func (expressionStatement *ExpressionStatement) String() string
func (*ExpressionStatement) TokenLiteral ¶
func (expressionStatement *ExpressionStatement) TokenLiteral() string
type FloatLiteral ¶
func (*FloatLiteral) String ¶
func (floatLiteral *FloatLiteral) String() string
func (*FloatLiteral) TokenLiteral ¶
func (floatLiteral *FloatLiteral) TokenLiteral() string
type ForStatement ¶
type ForStatement struct { Token token.Token Element *Identifier Iterator Expression Body *BlockStatement }
func (*ForStatement) String ¶
func (forStatement *ForStatement) String() string
func (*ForStatement) TokenLiteral ¶
func (forStatement *ForStatement) TokenLiteral() string
type FunctionLiteral ¶
type FunctionLiteral struct { Token token.Token Name string Parameters []*Identifier Body *BlockStatement }
func (*FunctionLiteral) String ¶
func (functionLiteral *FunctionLiteral) String() string
func (*FunctionLiteral) TokenLiteral ¶
func (functionLiteral *FunctionLiteral) TokenLiteral() string
type HashLiteral ¶
type HashLiteral struct { Token token.Token Pairs map[Expression]Expression }
func (*HashLiteral) String ¶
func (hashLiteral *HashLiteral) String() string
func (*HashLiteral) TokenLiteral ¶
func (hashLiteral *HashLiteral) TokenLiteral() string
type Identifier ¶
func (*Identifier) String ¶
func (identifier *Identifier) String() string
func (*Identifier) TokenLiteral ¶
func (identifier *Identifier) TokenLiteral() string
type IfExpression ¶
type IfExpression struct { Token token.Token Condition Expression Consequence *BlockStatement Alternate *BlockStatement }
func (*IfExpression) String ¶
func (ifExpression *IfExpression) String() string
func (*IfExpression) TokenLiteral ¶
func (ifExpression *IfExpression) TokenLiteral() string
type IndexExpression ¶
type IndexExpression struct { Token token.Token Array Expression Index Expression }
func (*IndexExpression) String ¶
func (indexExpression *IndexExpression) String() string
func (*IndexExpression) TokenLiteral ¶
func (indexExpression *IndexExpression) TokenLiteral() string
type InfixExpression ¶
type InfixExpression struct { Token token.Token Left Expression Operator string Right Expression }
func (*InfixExpression) String ¶
func (infixExpression *InfixExpression) String() string
func (*InfixExpression) TokenLiteral ¶
func (infixExpression *InfixExpression) TokenLiteral() string
type IntegerLiteral ¶
func (*IntegerLiteral) String ¶
func (integerLiteral *IntegerLiteral) String() string
func (*IntegerLiteral) TokenLiteral ¶
func (integerLiteral *IntegerLiteral) TokenLiteral() string
type LetStatement ¶
type LetStatement struct { Token token.Token Name *Identifier Value Expression }
func (*LetStatement) String ¶
func (letStatement *LetStatement) String() string
func (*LetStatement) TokenLiteral ¶
func (letStatement *LetStatement) TokenLiteral() string
type PrefixExpression ¶
type PrefixExpression struct { Token token.Token Operator string Right Expression }
func (*PrefixExpression) String ¶
func (prefixExpression *PrefixExpression) String() string
func (*PrefixExpression) TokenLiteral ¶
func (prefixExpression *PrefixExpression) TokenLiteral() string
type Program ¶
func (*Program) TokenLiteral ¶
type ReturnStatement ¶
type ReturnStatement struct { Token token.Token ReturnValue Expression }
func (*ReturnStatement) String ¶
func (returnStatement *ReturnStatement) String() string
func (*ReturnStatement) TokenLiteral ¶
func (returnStatement *ReturnStatement) TokenLiteral() string
type StringLiteral ¶
func (*StringLiteral) String ¶
func (stringLiteral *StringLiteral) String() string
func (*StringLiteral) TokenLiteral ¶
func (stringLiteral *StringLiteral) TokenLiteral() string
type TryStatement ¶
type TryStatement struct { Token token.Token Try *BlockStatement Catch *BlockStatement Error *Identifier Finally *BlockStatement }
func (*TryStatement) String ¶
func (tryStatement *TryStatement) String() string
func (*TryStatement) TokenLiteral ¶
func (tryStatement *TryStatement) TokenLiteral() string
type WhileStatement ¶
type WhileStatement struct { Token token.Token Condition Expression Body *BlockStatement }
func (*WhileStatement) String ¶
func (whileStatement *WhileStatement) String() string
func (*WhileStatement) TokenLiteral ¶
func (whileStatement *WhileStatement) TokenLiteral() string
Click to show internal directories.
Click to hide internal directories.