Documentation
¶
Index ¶
- type Assignment
- type Class
- type ClassMember
- type ElseIfStatement
- type Expr
- type ExprStatement
- type FloatingNumber
- type Function
- type FunctionCall
- type FunctionParam
- type IfElseStatement
- type IfStatement
- type Interface
- type Node
- func CreateAssignment(variable Node, expr Node) Node
- func CreateClass(className string) Node
- func CreateExprStatement(expr Node) Node
- func CreateFloatingNumber(token string) Node
- func CreateIfElseStatement(expr Expr, body *StatementList, elseBody *StatementList) Node
- func CreateIfStatement(expr Expr, body *StatementList) Node
- func CreateInterface(name string) Node
- func CreateNumber(token string) Node
- func CreateReturnStatement(expr Node) Node
- func CreateVariable(identifier string) Node
- type Number
- type ReturnStatement
- type Statement
- type StatementList
- type UnaryExpr
- type Variable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assignment ¶
type Class ¶
type Class struct { Name string // Properties []Node // Methods []Node Super *string Interfaces []string Body *StatementList }
func (*Class) AddInterface ¶
func (*Class) SetInterfaces ¶
type ClassMember ¶
func CreateClassMember ¶
func CreateClassMember(name string) ClassMember
func (*ClassMember) SetValue ¶
func (self *ClassMember) SetValue(val Node)
type ElseIfStatement ¶
type ElseIfStatement struct { Expr Expr Body *StatementList }
type Expr ¶
func CreateExpr ¶
type ExprStatement ¶
type ExprStatement struct {
Expr Node
}
type FloatingNumber ¶
type FloatingNumber struct {
Val float64
}
type Function ¶
type Function struct { Name string Params []FunctionParam Body *StatementList }
func CreateFunction ¶
func CreateFunction(name string, params []FunctionParam, stmts *StatementList) Function
type FunctionCall ¶
func CreateFunctionCall ¶
func CreateFunctionCall(name string, params []Node) FunctionCall
type FunctionParam ¶
type IfElseStatement ¶
type IfElseStatement struct { Expr Expr Body *StatementList ElseBody *StatementList }
type IfStatement ¶
type IfStatement struct { Expr Expr Body *StatementList ElseIfList []ElseIfStatement ElseBody *StatementList }
func (*IfStatement) AddElseIf ¶
func (self *IfStatement) AddElseIf(expr Expr, body *StatementList)
func (*IfStatement) SetElse ¶
func (self *IfStatement) SetElse(body *StatementList)
type Node ¶
type Node interface { }
func CreateAssignment ¶
func CreateClass ¶
func CreateExprStatement ¶
func CreateFloatingNumber ¶
func CreateIfElseStatement ¶
func CreateIfElseStatement(expr Expr, body *StatementList, elseBody *StatementList) Node
func CreateIfStatement ¶
func CreateIfStatement(expr Expr, body *StatementList) Node
func CreateInterface ¶
func CreateNumber ¶
func CreateReturnStatement ¶
func CreateVariable ¶
type ReturnStatement ¶
type ReturnStatement struct {
Expr Node
}
type StatementList ¶
type StatementList []Node
func CreateStatementList ¶
func CreateStatementList() *StatementList
func (*StatementList) Append ¶
func (self *StatementList) Append(node Node)
type UnaryExpr ¶
func CreateUnaryExpr ¶
Click to show internal directories.
Click to hide internal directories.