Documentation ¶
Index ¶
- func RandStringBytes(n int) string
- type ArrayLiteral
- type BlockStatement
- type Boolean
- type CallExpression
- type ClassDefinition
- type ExportStatement
- type Expression
- type ExpressionStatement
- type FloatLiteral
- type FunctionLiteral
- type HashLiteral
- type Identifier
- type IfExpression
- type IndexExpression
- type InfixExpression
- type IntegerLiteral
- type IterStatement
- type LetStatement
- type LoadStatement
- type LoopExpression
- type Node
- type PrefixExpression
- type Program
- type ReturnStatement
- type ScopeDefinition
- type Statement
- type StringLiteral
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandStringBytes ¶ added in v0.0.2
Types ¶
type ArrayLiteral ¶
type ArrayLiteral struct { Token token.Token // the '[' token Elements []Expression }
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 Boolean ¶
func (*Boolean) TokenLiteral ¶
type CallExpression ¶
type CallExpression struct { Token token.Token // The '(' token Function Expression // Identifier or FunctionLiteral Arguments []Expression }
func (*CallExpression) String ¶
func (ce *CallExpression) String() string
func (*CallExpression) TokenLiteral ¶
func (ce *CallExpression) TokenLiteral() string
type ClassDefinition ¶ added in v0.0.2
type ClassDefinition struct { Token token.Token // the { token Name *Identifier Block *BlockStatement }
func (*ClassDefinition) ConvertToFunc ¶ added in v0.0.2
func (sd *ClassDefinition) ConvertToFunc() []Statement
func (*ClassDefinition) String ¶ added in v0.0.2
func (sd *ClassDefinition) String() string
func (*ClassDefinition) TokenLiteral ¶ added in v0.0.2
func (sd *ClassDefinition) TokenLiteral() string
type ExportStatement ¶
type ExportStatement struct { Token token.Token // the 'return' token Identifier *Identifier }
func (*ExportStatement) String ¶
func (rs *ExportStatement) String() string
func (*ExportStatement) TokenLiteral ¶
func (rs *ExportStatement) TokenLiteral() string
type Expression ¶
type Expression interface { Node // contains filtered or unexported methods }
type ExpressionStatement ¶
type ExpressionStatement struct { Token token.Token // the first token of the expression 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 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 HashLiteral ¶
type HashLiteral struct { Token token.Token // The '{' 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 IfExpression ¶
type IfExpression struct { Token token.Token // The 'if' token Condition Expression Consequence *BlockStatement Alternative *BlockStatement }
func (*IfExpression) String ¶
func (ie *IfExpression) String() string
func (*IfExpression) TokenLiteral ¶
func (ie *IfExpression) TokenLiteral() string
type IndexExpression ¶
type IndexExpression struct { Token token.Token // The [ token Left Expression Index Expression HasUpper bool IndexUpper Expression HasSkip bool IndexSkip 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 // The operator token, e.g. + Left Expression Operator string Right Expression }
func (*InfixExpression) String ¶
func (oe *InfixExpression) String() string
func (*InfixExpression) TokenLiteral ¶
func (oe *InfixExpression) TokenLiteral() string
type IntegerLiteral ¶
func (*IntegerLiteral) String ¶
func (il *IntegerLiteral) String() string
func (*IntegerLiteral) TokenLiteral ¶
func (il *IntegerLiteral) TokenLiteral() string
type IterStatement ¶ added in v0.0.2
type IterStatement struct { Token token.Token // the token.Let token Identifier *Identifier Expression Expression Statements *BlockStatement }
func (*IterStatement) ConvertToLoop ¶ added in v0.0.2
func (is *IterStatement) ConvertToLoop() []Statement
func (*IterStatement) String ¶ added in v0.0.2
func (ls *IterStatement) String() string
func (*IterStatement) TokenLiteral ¶ added in v0.0.2
func (ls *IterStatement) TokenLiteral() string
type LetStatement ¶
type LetStatement struct { Token token.Token // the token.Let token Name *Identifier Value Expression }
func (*LetStatement) String ¶
func (ls *LetStatement) String() string
func (*LetStatement) TokenLiteral ¶
func (ls *LetStatement) TokenLiteral() string
type LoadStatement ¶
type LoadStatement struct { Token token.Token // the 'return' token Identifier *Identifier }
func (*LoadStatement) String ¶
func (rs *LoadStatement) String() string
func (*LoadStatement) TokenLiteral ¶
func (rs *LoadStatement) TokenLiteral() string
type LoopExpression ¶
type LoopExpression struct { Token token.Token // The 'loop' token Condition Expression Consequence *BlockStatement }
func (*LoopExpression) String ¶
func (le *LoopExpression) String() string
func (*LoopExpression) TokenLiteral ¶
func (le *LoopExpression) TokenLiteral() string
type PrefixExpression ¶
type PrefixExpression struct { Token token.Token // The prefix token, e.g. ! Operator string Right Expression }
func (*PrefixExpression) String ¶
func (pe *PrefixExpression) String() string
func (*PrefixExpression) TokenLiteral ¶
func (pe *PrefixExpression) TokenLiteral() string
type ReturnStatement ¶
type ReturnStatement struct { Token token.Token // the 'return' token ReturnValue Expression }
func (*ReturnStatement) String ¶
func (rs *ReturnStatement) String() string
func (*ReturnStatement) TokenLiteral ¶
func (rs *ReturnStatement) TokenLiteral() string
type ScopeDefinition ¶
type ScopeDefinition struct { Token token.Token // the { token Name *Identifier Block *BlockStatement }
func (*ScopeDefinition) String ¶
func (sd *ScopeDefinition) String() string
func (*ScopeDefinition) TokenLiteral ¶
func (sd *ScopeDefinition) TokenLiteral() string
type StringLiteral ¶
func (*StringLiteral) String ¶
func (sl *StringLiteral) String() string
func (*StringLiteral) TokenLiteral ¶
func (sl *StringLiteral) TokenLiteral() string
Source Files ¶
- ast.go
- ast_class_definition.go
- ast_expression.go
- ast_expression_boolean.go
- ast_expression_call.go
- ast_expression_identifier.go
- ast_expression_if.go
- ast_expression_index.go
- ast_expression_infix.go
- ast_expression_literal_array.go
- ast_expression_literal_float.go
- ast_expression_literal_func.go
- ast_expression_literal_hash.go
- ast_expression_literal_int.go
- ast_expression_literal_string.go
- ast_expression_loop.go
- ast_expression_prefix.go
- ast_program.go
- ast_scope_definition.go
- ast_statement.go
- ast_statement_block.go
- ast_statement_export.go
- ast_statement_expression.go
- ast_statement_iter.go
- ast_statement_let.go
- ast_statement_load.go
- ast_statement_return.go
Click to show internal directories.
Click to hide internal directories.