Documentation ¶
Index ¶
- type Array
- type AssignStatement
- type AttributeExpression
- type BlockStatement
- type Boolean
- type BreakStatement
- type CallExpression
- type ClassLiteral
- type CompareExpression
- type ContinueStatement
- type DefStatement
- type DeleteStatement
- type DoExpression
- type Expression
- type ExpressionStatement
- type FloatLiteral
- type FunctionLiteral
- type HashLiteral
- type Identifier
- type IfExpression
- type IfaceMethodDef
- type ImportStatement
- type IndexExpression
- type InfixExpression
- type IntegerLiteral
- type InterfaceLiteral
- type IterLoopStatement
- type LoopStatement
- type NewInstance
- type Node
- type NullLiteral
- type PassStatement
- type PrefixExpression
- type Program
- type ReturnStatement
- type Statement
- type StringLiteral
- type ThrowStatement
- type TryCatchExpression
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array struct { Token token.Token // the '[' token Elements []Expression }
func (*Array) TokenLiteral ¶
type AssignStatement ¶
type AssignStatement struct { Token token.Token // the token.DEF token Left Expression Value Expression }
func (*AssignStatement) String ¶
func (a *AssignStatement) String() string
func (*AssignStatement) TokenLiteral ¶
func (a *AssignStatement) TokenLiteral() string
type AttributeExpression ¶
type AttributeExpression struct { Token token.Token Left Expression Index *StringLiteral }
func (*AttributeExpression) String ¶
func (i *AttributeExpression) String() string
func (*AttributeExpression) TokenLiteral ¶
func (i *AttributeExpression) 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 BreakStatement ¶
func (*BreakStatement) String ¶
func (b *BreakStatement) String() string
func (*BreakStatement) TokenLiteral ¶
func (b *BreakStatement) TokenLiteral() string
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 ClassLiteral ¶
type ClassLiteral struct { Token token.Token Name string Parent string Fields []*DefStatement Methods map[string]*FunctionLiteral }
func (*ClassLiteral) String ¶
func (c *ClassLiteral) String() string
func (*ClassLiteral) TokenLiteral ¶
func (c *ClassLiteral) TokenLiteral() string
type CompareExpression ¶
type CompareExpression struct { Token token.Token // and, or Left Expression Right Expression }
func (*CompareExpression) String ¶
func (i *CompareExpression) String() string
func (*CompareExpression) TokenLiteral ¶
func (i *CompareExpression) TokenLiteral() string
type ContinueStatement ¶
func (*ContinueStatement) String ¶
func (c *ContinueStatement) String() string
func (*ContinueStatement) TokenLiteral ¶
func (c *ContinueStatement) TokenLiteral() string
type DefStatement ¶
type DefStatement struct { Token token.Token // the token.DEF token Const bool Name *Identifier Value Expression }
func (*DefStatement) String ¶
func (d *DefStatement) String() string
func (*DefStatement) TokenLiteral ¶
func (d *DefStatement) TokenLiteral() string
type DeleteStatement ¶
func (*DeleteStatement) String ¶
func (d *DeleteStatement) String() string
func (*DeleteStatement) TokenLiteral ¶
func (d *DeleteStatement) TokenLiteral() string
type DoExpression ¶
type DoExpression struct { Token token.Token Statements *BlockStatement }
func (*DoExpression) String ¶
func (d *DoExpression) String() string
func (*DoExpression) TokenLiteral ¶
func (d *DoExpression) 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 (f *FloatLiteral) String() string
func (*FloatLiteral) TokenLiteral ¶
func (f *FloatLiteral) TokenLiteral() string
type FunctionLiteral ¶
type FunctionLiteral struct { Token token.Token // The 'func' token Name string FQName string Native bool 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 (h *HashLiteral) String() string
func (*HashLiteral) TokenLiteral ¶
func (h *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 IfaceMethodDef ¶
type ImportStatement ¶
type ImportStatement struct { Token token.Token // the token.Import token Path *StringLiteral Name *Identifier }
func (*ImportStatement) String ¶
func (i *ImportStatement) String() string
func (*ImportStatement) TokenLiteral ¶
func (i *ImportStatement) TokenLiteral() string
type IndexExpression ¶
type IndexExpression struct { Token token.Token // The '[' token 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 { Token token.Token // the infix token, e.g. +, < Left Expression Operator string Right Expression }
func (*InfixExpression) String ¶
func (i *InfixExpression) String() string
func (*InfixExpression) TokenLiteral ¶
func (i *InfixExpression) TokenLiteral() string
type IntegerLiteral ¶
func (*IntegerLiteral) String ¶
func (i *IntegerLiteral) String() string
func (*IntegerLiteral) TokenLiteral ¶
func (i *IntegerLiteral) TokenLiteral() string
type InterfaceLiteral ¶
type InterfaceLiteral struct { Token token.Token Name string Methods map[string]*IfaceMethodDef }
func (*InterfaceLiteral) String ¶
func (c *InterfaceLiteral) String() string
func (*InterfaceLiteral) TokenLiteral ¶
func (c *InterfaceLiteral) TokenLiteral() string
type IterLoopStatement ¶
type IterLoopStatement struct { Token token.Token Key *Identifier Value *Identifier Iter Expression Body *BlockStatement }
func (*IterLoopStatement) String ¶
func (fl *IterLoopStatement) String() string
func (*IterLoopStatement) TokenLiteral ¶
func (fl *IterLoopStatement) TokenLiteral() string
type LoopStatement ¶
type LoopStatement struct { Token token.Token Init *DefStatement Condition Expression Iter Node Body *BlockStatement }
func (*LoopStatement) String ¶
func (fl *LoopStatement) String() string
func (*LoopStatement) TokenLiteral ¶
func (fl *LoopStatement) TokenLiteral() string
type NewInstance ¶
type NewInstance struct { Token token.Token Class Expression Arguments []Expression }
func (*NewInstance) String ¶
func (m *NewInstance) String() string
func (*NewInstance) TokenLiteral ¶
func (m *NewInstance) TokenLiteral() string
type NullLiteral ¶
func (*NullLiteral) String ¶
func (n *NullLiteral) String() string
func (*NullLiteral) TokenLiteral ¶
func (n *NullLiteral) TokenLiteral() string
type PassStatement ¶
func (*PassStatement) String ¶
func (b *PassStatement) String() string
func (*PassStatement) TokenLiteral ¶
func (b *PassStatement) TokenLiteral() string
type PrefixExpression ¶
type PrefixExpression struct { Token token.Token // the prefix token, e.g. ! Operator string Right Expression }
func (*PrefixExpression) String ¶
func (p *PrefixExpression) String() string
func (*PrefixExpression) TokenLiteral ¶
func (p *PrefixExpression) TokenLiteral() string
type Program ¶
func (*Program) TokenLiteral ¶
type ReturnStatement ¶
type ReturnStatement struct { Token token.Token // the 'return' token Value Expression }
func (*ReturnStatement) String ¶
func (r *ReturnStatement) String() string
func (*ReturnStatement) TokenLiteral ¶
func (r *ReturnStatement) TokenLiteral() string
type StringLiteral ¶
func (*StringLiteral) String ¶
func (s *StringLiteral) String() string
func (*StringLiteral) TokenLiteral ¶
func (s *StringLiteral) TokenLiteral() string
type ThrowStatement ¶
type ThrowStatement struct { Token token.Token Expression Expression }
func (*ThrowStatement) String ¶
func (t *ThrowStatement) String() string
func (*ThrowStatement) TokenLiteral ¶
func (t *ThrowStatement) TokenLiteral() string
type TryCatchExpression ¶
type TryCatchExpression struct { Try *BlockStatement Catch *BlockStatement Symbol *Identifier }
func (*TryCatchExpression) String ¶
func (t *TryCatchExpression) String() string
func (*TryCatchExpression) TokenLiteral ¶
func (t *TryCatchExpression) TokenLiteral() string
Click to show internal directories.
Click to hide internal directories.