Documentation
¶
Index ¶
- type AssignmentExpression
- type AssignmentIndexExpression
- type AssignmentStruct
- type AstNode
- type BinaryExpression
- type BlockStatement
- type BoolExpression
- type CallExpression
- type Expression
- type ForStatement
- type FunctionStatement
- type GetExpression
- type GroupExpression
- type HashMapExpression
- type IfStatement
- type ListExpression
- type LogicalExpression
- type NumberExpression
- type PrintStatement
- type ReturnStatement
- type Statement
- type StatementExpression
- type StringExpression
- type StructStatement
- type UnaryExpression
- type VariableExpression
- type VariableStatement
- type WhileStatement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssignmentExpression ¶
type AssignmentExpression struct { Name token.Token Value Expression }
Expressions
func (*AssignmentExpression) String ¶
func (ae *AssignmentExpression) String() string
type AssignmentIndexExpression ¶
type AssignmentIndexExpression struct { Name token.Token Index Expression Value Expression }
func (*AssignmentIndexExpression) String ¶
func (aie *AssignmentIndexExpression) String() string
type AssignmentStruct ¶
type AssignmentStruct struct { Name token.Token Attribute Expression Value Expression }
func (*AssignmentStruct) String ¶
func (as *AssignmentStruct) String() string
type BinaryExpression ¶
type BinaryExpression struct { Left Expression Right Expression Operator token.Token }
func (*BinaryExpression) String ¶
func (be *BinaryExpression) String() string
type BlockStatement ¶
type BlockStatement struct {
Statements []Statement
}
type BoolExpression ¶
type BoolExpression struct {
Value bool
}
func (*BoolExpression) String ¶
func (be *BoolExpression) String() string
type CallExpression ¶
type CallExpression struct { Callee Expression Arguments []Expression }
func (*CallExpression) String ¶
func (ce *CallExpression) String() string
type Expression ¶
type ForStatement ¶
type ForStatement struct { Variable Statement Condition Expression Effect Expression Body Statement }
type FunctionStatement ¶
type FunctionStatement struct { Name token.Token Params []token.Token Body BlockStatement }
type GetExpression ¶
type GetExpression struct { Callee Expression Caller Expression Arguments []Expression IsMethod bool }
This is almost the same as CallExpression except that the use-case for this is variable.{attribute} or in the future when methods are supported : variable.method()
func (*GetExpression) String ¶
func (ge *GetExpression) String() string
type GroupExpression ¶
type GroupExpression struct {
Expr Expression
}
func (*GroupExpression) String ¶
func (ge *GroupExpression) String() string
type HashMapExpression ¶
type HashMapExpression struct {
Values map[Expression]Expression
}
func (*HashMapExpression) String ¶
func (hme *HashMapExpression) String() string
type IfStatement ¶
type IfStatement struct { Condition Expression Then Statement Else Statement }
type ListExpression ¶
type ListExpression struct {
Values []Expression
}
func (*ListExpression) String ¶
func (le *ListExpression) String() string
type LogicalExpression ¶
type LogicalExpression struct { Left Expression Right Expression Operator token.Token }
func (*LogicalExpression) String ¶
func (le *LogicalExpression) String() string
type NumberExpression ¶
type NumberExpression struct {
Value int
}
func (*NumberExpression) String ¶
func (ne *NumberExpression) String() string
type PrintStatement ¶
type PrintStatement struct {
Expr Expression
}
type ReturnStatement ¶
type ReturnStatement struct { Keyword token.Token Value Expression }
type StringExpression ¶
type StringExpression struct {
Value string
}
func (*StringExpression) String ¶
func (se *StringExpression) String() string
type StructStatement ¶
type UnaryExpression ¶
type UnaryExpression struct { Right Expression Operator token.Token }
func (*UnaryExpression) String ¶
func (ue *UnaryExpression) String() string
type VariableExpression ¶
func (*VariableExpression) String ¶
func (ve *VariableExpression) String() string
type VariableStatement ¶
type VariableStatement struct { Name token.Token Initializer Expression }
type WhileStatement ¶
type WhileStatement struct { Condition Expression Body Statement }
Click to show internal directories.
Click to hide internal directories.