Documentation
¶
Index ¶
- type ArrayLiteral
- type AssignmentExpression
- type BinaryExpression
- type BlockStatement
- type Boolean
- type BooleanLiteral
- type CallExpression
- type DeferStatement
- type Expression
- type ExpressionStatement
- type FloatLiteral
- type FunctionCall
- type FunctionDeclaration
- type FunctionLiteral
- type FunctionStatement
- type HashLiteral
- type Identifier
- type IfStatement
- type IndexExpression
- type InfixExpression
- type Integer
- type IntegerLiteral
- type LetStatement
- type Node
- type NumberType
- type Parameter
- type PrefixExpression
- type Program
- type ReturnStatement
- type Statement
- type StringLiteral
- type StructDefinition
- type StructField
- type StructLiteral
- type VariableDeclaration
- type WhileExpression
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayLiteral ¶
type ArrayLiteral struct {
Elements []Expression
}
func (*ArrayLiteral) String ¶
func (a *ArrayLiteral) String() string
func (*ArrayLiteral) TokenLiteral ¶
func (a *ArrayLiteral) TokenLiteral() string
type AssignmentExpression ¶
type AssignmentExpression struct { Token token.Token Left Expression Right Expression }
func (*AssignmentExpression) String ¶
func (ae *AssignmentExpression) String() string
func (*AssignmentExpression) TokenLiteral ¶
func (ae *AssignmentExpression) TokenLiteral() string
type BinaryExpression ¶
type BinaryExpression struct { Left Expression Operator token.Token Right Expression }
func (*BinaryExpression) String ¶
func (be *BinaryExpression) String() string
func (*BinaryExpression) TokenLiteral ¶
func (be *BinaryExpression) TokenLiteral() string
type BlockStatement ¶
func (*BlockStatement) String ¶
func (bs *BlockStatement) String() string
func (*BlockStatement) TokenLiteral ¶
func (bs *BlockStatement) TokenLiteral() string
type Boolean ¶
type Boolean struct { Token token.Token // the token.Boolean token, either true or false Value bool }
func (*Boolean) TokenLiteral ¶
type BooleanLiteral ¶
func (*BooleanLiteral) String ¶
func (bl *BooleanLiteral) String() string
func (*BooleanLiteral) TokenLiteral ¶
func (bl *BooleanLiteral) TokenLiteral() string
type CallExpression ¶
type CallExpression struct { Function *Identifier Arguments []Expression }
func (*CallExpression) String ¶
func (c *CallExpression) String() string
func (*CallExpression) TokenLiteral ¶
func (c *CallExpression) TokenLiteral() string
type DeferStatement ¶
func (*DeferStatement) String ¶
func (ds *DeferStatement) String() string
func (*DeferStatement) TokenLiteral ¶
func (ds *DeferStatement) 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 (es *ExpressionStatement) String() string
func (*ExpressionStatement) TokenLiteral ¶
func (es *ExpressionStatement) TokenLiteral() string
type FloatLiteral ¶
func (*FloatLiteral) String ¶
func (il *FloatLiteral) String() string
func (*FloatLiteral) TokenLiteral ¶
func (il *FloatLiteral) TokenLiteral() string
type FunctionCall ¶
type FunctionCall struct { FunctionName string Token token.Token Function Expression Arguments []Expression }
func (*FunctionCall) String ¶
func (f *FunctionCall) String() string
func (*FunctionCall) TokenLiteral ¶
func (f *FunctionCall) TokenLiteral() string
type FunctionDeclaration ¶
type FunctionDeclaration struct { ReturnTypes []*Identifier Name *Identifier Parameters []*Parameter Body *BlockStatement }
func (*FunctionDeclaration) String ¶
func (fd *FunctionDeclaration) String() string
func (*FunctionDeclaration) TokenLiteral ¶
func (fd *FunctionDeclaration) TokenLiteral() string
type FunctionLiteral ¶
type FunctionLiteral struct { Token token.Token // the 'fn' token Parameters []*Identifier Body *BlockStatement }
func (*FunctionLiteral) String ¶
func (fl *FunctionLiteral) String() string
func (*FunctionLiteral) TokenLiteral ¶
func (fl *FunctionLiteral) TokenLiteral() string
type FunctionStatement ¶
type FunctionStatement struct { IsExported bool Name *Identifier Parameters []*Parameter Body *BlockStatement ReturnTypes []Expression }
func (*FunctionStatement) ReturnTypesString ¶
func (f *FunctionStatement) ReturnTypesString() string
func (*FunctionStatement) String ¶
func (f *FunctionStatement) String() string
func (*FunctionStatement) TokenLiteral ¶
func (f *FunctionStatement) TokenLiteral() string
type HashLiteral ¶
type HashLiteral struct { Token token.Token Pairs map[Expression]Expression }
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 IfStatement ¶
type IfStatement struct { Token token.Token Condition Expression Consequence *BlockStatement Alternative *BlockStatement }
func (*IfStatement) String ¶
func (ie *IfStatement) String() string
func (*IfStatement) TokenLiteral ¶
func (ie *IfStatement) TokenLiteral() string
type IndexExpression ¶
type IndexExpression struct { 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 { Left Expression Operator token.Token Right Expression }
func (*InfixExpression) String ¶
func (ie *InfixExpression) String() string
func (*InfixExpression) TokenLiteral ¶
func (ie *InfixExpression) TokenLiteral() string
type Integer ¶
func (*Integer) TokenLiteral ¶
type IntegerLiteral ¶
func (*IntegerLiteral) String ¶
func (il *IntegerLiteral) String() string
func (*IntegerLiteral) TokenLiteral ¶
func (il *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 NumberType ¶
func (*NumberType) String ¶
func (nt *NumberType) String() string
func (*NumberType) TokenLiteral ¶
func (nt *NumberType) TokenLiteral() string
type Parameter ¶
type Parameter struct { Identifier *Identifier Type token.Type }
type PrefixExpression ¶
type PrefixExpression struct { Token token.Token Operator token.Token Right Expression }
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) JSONPretty ¶
func (*Program) TokenLiteral ¶
type ReturnStatement ¶
type ReturnStatement struct { Token token.Token ReturnValues []Expression }
func (*ReturnStatement) String ¶
func (rs *ReturnStatement) String() string
func (*ReturnStatement) TokenLiteral ¶
func (rs *ReturnStatement) TokenLiteral() string
type StringLiteral ¶
func (*StringLiteral) String ¶
func (sl *StringLiteral) String() string
func (*StringLiteral) TokenLiteral ¶
func (sl *StringLiteral) TokenLiteral() string
type StructDefinition ¶
type StructDefinition struct { Token token.Token Name *Identifier Fields []*StructField }
func (*StructDefinition) String ¶
func (sd *StructDefinition) String() string
func (*StructDefinition) TokenLiteral ¶
func (sd *StructDefinition) TokenLiteral() string
type StructField ¶
type StructField struct { Token token.Token Name *Identifier Type token.Type }
func (*StructField) String ¶
func (sf *StructField) String() string
func (*StructField) TokenLiteral ¶
func (sf *StructField) TokenLiteral() string
type StructLiteral ¶
type StructLiteral struct { Token token.Token Fields map[string]Expression StructName *Identifier }
func (*StructLiteral) String ¶
func (sl *StructLiteral) String() string
func (*StructLiteral) TokenLiteral ¶
func (sl *StructLiteral) TokenLiteral() string
type VariableDeclaration ¶
type VariableDeclaration struct { Type token.Token Name *Identifier Value Expression }
func (*VariableDeclaration) String ¶
func (vd *VariableDeclaration) String() string
func (*VariableDeclaration) TokenLiteral ¶
func (vd *VariableDeclaration) TokenLiteral() string
type WhileExpression ¶
type WhileExpression struct { Condition Expression Body Statement ID int }
func (*WhileExpression) String ¶
func (w *WhileExpression) String() string
func (*WhileExpression) TokenLiteral ¶
func (w *WhileExpression) TokenLiteral() string
Click to show internal directories.
Click to hide internal directories.