Documentation ¶
Index ¶
- type ArrayLiteral
- type BlockStatement
- type Boolean
- type CallExpression
- type CommentStatement
- type Expression
- type ExpressionStatement
- type FunctionLiteral
- type HashLiteral
- type Identifier
- type IfExpression
- type IndexExpression
- type InfixExpression
- type IntegerLiteral
- type LazyExpression
- type LetStatement
- type Node
- type NullLiteral
- type PrefixExpression
- type Program
- type ReturnStatement
- type Statement
- type StringLiteral
- type Struct
- type StructField
- type StructInstantiation
- type StructMemberAccessExpression
- type StructMethod
- type SwitchCase
- type SwitchExpression
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayLiteral ¶
type ArrayLiteral struct { Token token.Token // the '[' token Elements []Expression }
func (*ArrayLiteral) GetToken ¶
func (self *ArrayLiteral) GetToken() token.Token
func (*ArrayLiteral) String ¶
func (self *ArrayLiteral) String() string
func (*ArrayLiteral) TokenLiteral ¶
func (self *ArrayLiteral) TokenLiteral() string
type BlockStatement ¶
func (*BlockStatement) GetToken ¶
func (self *BlockStatement) GetToken() token.Token
func (*BlockStatement) String ¶
func (self *BlockStatement) String() string
func (*BlockStatement) TokenLiteral ¶
func (self *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) GetToken ¶
func (self *CallExpression) GetToken() token.Token
func (*CallExpression) String ¶
func (self *CallExpression) String() string
func (*CallExpression) TokenLiteral ¶
func (self *CallExpression) TokenLiteral() string
type CommentStatement ¶
func (*CommentStatement) GetToken ¶
func (self *CommentStatement) GetToken() token.Token
func (*CommentStatement) String ¶
func (self *CommentStatement) String() string
func (*CommentStatement) TokenLiteral ¶
func (self *CommentStatement) 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) GetToken ¶
func (self *ExpressionStatement) GetToken() token.Token
func (*ExpressionStatement) String ¶
func (self *ExpressionStatement) String() string
func (*ExpressionStatement) TokenLiteral ¶
func (self *ExpressionStatement) TokenLiteral() string
type FunctionLiteral ¶
type FunctionLiteral struct { Token token.Token // The 'fn' token Parameters []*Identifier Body *BlockStatement }
func (*FunctionLiteral) GetToken ¶
func (self *FunctionLiteral) GetToken() token.Token
func (*FunctionLiteral) String ¶
func (self *FunctionLiteral) String() string
func (*FunctionLiteral) TokenLiteral ¶
func (self *FunctionLiteral) TokenLiteral() string
type HashLiteral ¶
type HashLiteral struct { Token token.Token // the '{' token Pairs map[Expression]Expression }
func (*HashLiteral) GetToken ¶
func (self *HashLiteral) GetToken() token.Token
func (*HashLiteral) String ¶
func (self *HashLiteral) String() string
func (*HashLiteral) TokenLiteral ¶
func (self *HashLiteral) TokenLiteral() string
type Identifier ¶
func (*Identifier) GetToken ¶
func (self *Identifier) GetToken() token.Token
func (*Identifier) String ¶
func (self *Identifier) String() string
func (*Identifier) TokenLiteral ¶
func (self *Identifier) TokenLiteral() string
type IfExpression ¶
type IfExpression struct { Token token.Token // The 'if' token Condition Expression Consequence *BlockStatement Alternative *BlockStatement }
func (*IfExpression) GetToken ¶
func (self *IfExpression) GetToken() token.Token
func (*IfExpression) String ¶
func (self *IfExpression) String() string
func (*IfExpression) TokenLiteral ¶
func (self *IfExpression) TokenLiteral() string
type IndexExpression ¶
type IndexExpression struct { Token token.Token // The [ token Left Expression Index Expression }
func (*IndexExpression) GetToken ¶
func (self *IndexExpression) GetToken() token.Token
func (*IndexExpression) String ¶
func (self *IndexExpression) String() string
func (*IndexExpression) TokenLiteral ¶
func (self *IndexExpression) TokenLiteral() string
type InfixExpression ¶
type InfixExpression struct { Token token.Token // The operator token, e.g. + Left Expression Operator string Right Expression }
func (*InfixExpression) GetToken ¶
func (self *InfixExpression) GetToken() token.Token
func (*InfixExpression) String ¶
func (self *InfixExpression) String() string
func (*InfixExpression) TokenLiteral ¶
func (self *InfixExpression) TokenLiteral() string
type IntegerLiteral ¶
func (*IntegerLiteral) GetToken ¶
func (self *IntegerLiteral) GetToken() token.Token
func (*IntegerLiteral) String ¶
func (self *IntegerLiteral) String() string
func (*IntegerLiteral) TokenLiteral ¶
func (self *IntegerLiteral) TokenLiteral() string
type LazyExpression ¶
type LazyExpression struct { Token token.Token // The prefix token, i.e. 'lazy' Right Expression }
func (*LazyExpression) GetToken ¶
func (self *LazyExpression) GetToken() token.Token
func (*LazyExpression) String ¶
func (self *LazyExpression) String() string
func (*LazyExpression) TokenLiteral ¶
func (self *LazyExpression) TokenLiteral() string
type LetStatement ¶
type LetStatement struct { Token token.Token // the token.LET token Name *Identifier Value Expression }
func (*LetStatement) GetToken ¶
func (self *LetStatement) GetToken() token.Token
func (*LetStatement) String ¶
func (self *LetStatement) String() string
func (*LetStatement) TokenLiteral ¶
func (self *LetStatement) TokenLiteral() string
type NullLiteral ¶
func (*NullLiteral) GetToken ¶
func (self *NullLiteral) GetToken() token.Token
func (*NullLiteral) String ¶
func (self *NullLiteral) String() string
func (*NullLiteral) TokenLiteral ¶
func (self *NullLiteral) TokenLiteral() string
type PrefixExpression ¶
type PrefixExpression struct { Token token.Token // The prefix token, e.g. ! Operator string Right Expression }
func (*PrefixExpression) GetToken ¶
func (self *PrefixExpression) GetToken() token.Token
func (*PrefixExpression) String ¶
func (self *PrefixExpression) String() string
func (*PrefixExpression) TokenLiteral ¶
func (self *PrefixExpression) TokenLiteral() string
type ReturnStatement ¶
type ReturnStatement struct { Token token.Token // the 'return' token ReturnValue Expression }
func (*ReturnStatement) GetToken ¶
func (self *ReturnStatement) GetToken() token.Token
func (*ReturnStatement) String ¶
func (self *ReturnStatement) String() string
func (*ReturnStatement) TokenLiteral ¶
func (self *ReturnStatement) TokenLiteral() string
type StringLiteral ¶
func (*StringLiteral) GetToken ¶
func (self *StringLiteral) GetToken() token.Token
func (*StringLiteral) String ¶
func (self *StringLiteral) String() string
func (*StringLiteral) TokenLiteral ¶
func (self *StringLiteral) TokenLiteral() string
type Struct ¶
type Struct struct { Token token.Token // The 'struct' token Name string // will be empty if no privacy acknowledgement is set PrivacyAcknowledgement string Fields []StructField Methods map[string]StructMethod }
func (*Struct) TokenLiteral ¶
type StructField ¶
type StructInstantiation ¶
type StructInstantiation struct { Token token.Token StructName string Arguments []Expression }
func (*StructInstantiation) GetToken ¶
func (self *StructInstantiation) GetToken() token.Token
func (*StructInstantiation) String ¶
func (self *StructInstantiation) String() string
func (*StructInstantiation) TokenLiteral ¶
func (self *StructInstantiation) TokenLiteral() string
type StructMemberAccessExpression ¶
type StructMemberAccessExpression struct { Token token.Token // The . token Left Expression MemberName string }
func (*StructMemberAccessExpression) GetToken ¶
func (self *StructMemberAccessExpression) GetToken() token.Token
func (*StructMemberAccessExpression) String ¶
func (self *StructMemberAccessExpression) String() string
func (*StructMemberAccessExpression) TokenLiteral ¶
func (self *StructMemberAccessExpression) TokenLiteral() string
type StructMethod ¶
type StructMethod struct { FunctionLiteral *FunctionLiteral Public bool }
type SwitchCase ¶
type SwitchCase struct { Value Expression Block *BlockStatement }
type SwitchExpression ¶
type SwitchExpression struct { Token token.Token // The 'switch' token Subject Expression Cases []SwitchCase Default *BlockStatement }
func (*SwitchExpression) GetToken ¶
func (self *SwitchExpression) GetToken() token.Token
func (*SwitchExpression) String ¶
func (self *SwitchExpression) String() string
func (*SwitchExpression) TokenLiteral ¶
func (self *SwitchExpression) TokenLiteral() string
Click to show internal directories.
Click to hide internal directories.