Documentation
¶
Index ¶
- type Compiler
- func (c *Compiler) Compare(expr expressions.BinaryExpr, ra string, rb string, rx string) string
- func (c *Compiler) Compile(program parser.Program)
- func (c *Compiler) VisitBinary(expr expressions.BinaryExpr) string
- func (c *Compiler) VisitBlock(stmt statements.BlockStmt) string
- func (c *Compiler) VisitExpression(stmt statements.ExpressionStmt) string
- func (c *Compiler) VisitFieldAccess(expr expressions.FieldAccessExpr) string
- func (c *Compiler) VisitFunctionCall(expr expressions.FunctionCallExpr) string
- func (c *Compiler) VisitFunctionDeclaration(stmt statements.FunctionDeclarationStmt) string
- func (c *Compiler) VisitGrouping(expr expressions.GroupingExpr) string
- func (c *Compiler) VisitIf(stmt statements.IfStmt) string
- func (c *Compiler) VisitList(expr expressions.ListExpr) string
- func (c *Compiler) VisitLiteral(expr expressions.LiteralExpr) string
- func (c *Compiler) VisitLogical(expr expressions.LogicalExpr) string
- func (c *Compiler) VisitReturn(stmt statements.ReturnStmt) string
- func (c *Compiler) VisitSlice(expr expressions.SliceExpr) string
- func (c *Compiler) VisitStructDeclaration(stmt statements.StructDeclarationStmt) string
- func (c *Compiler) VisitUnary(expr expressions.UnaryExpr) string
- func (c *Compiler) VisitVariable(expr expressions.VariableExpr) string
- func (c *Compiler) VisitVariableAssignment(stmt statements.VariableAssignmentStmt) string
- func (c *Compiler) VisitVariableDeclaration(stmt statements.VariableDeclarationStmt) string
- type TypedIdentifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compiler ¶
type Compiler struct {
Config interfaces.ProjectConfig
ProjectRoot string
Namespace string
DatapackRoot string
Headers []interfaces.DatapackHeader
expressions.ExprVisitor
statements.StmtVisitor
LoadFuncName string
TickFuncName string
// contains filtered or unexported fields
}
func NewCompiler ¶
func NewCompiler( config interfaces.ProjectConfig, projectRoot string, headers []interfaces.DatapackHeader, libs embed.FS, ) *Compiler
func (*Compiler) Compare ¶
func (c *Compiler) Compare(expr expressions.BinaryExpr, ra string, rb string, rx string) string
func (*Compiler) VisitBinary ¶
func (c *Compiler) VisitBinary(expr expressions.BinaryExpr) string
func (*Compiler) VisitBlock ¶
func (c *Compiler) VisitBlock(stmt statements.BlockStmt) string
func (*Compiler) VisitExpression ¶
func (c *Compiler) VisitExpression(stmt statements.ExpressionStmt) string
func (*Compiler) VisitFieldAccess ¶
func (c *Compiler) VisitFieldAccess(expr expressions.FieldAccessExpr) string
func (*Compiler) VisitFunctionCall ¶
func (c *Compiler) VisitFunctionCall(expr expressions.FunctionCallExpr) string
func (*Compiler) VisitFunctionDeclaration ¶
func (c *Compiler) VisitFunctionDeclaration(stmt statements.FunctionDeclarationStmt) string
func (*Compiler) VisitGrouping ¶
func (c *Compiler) VisitGrouping(expr expressions.GroupingExpr) string
func (*Compiler) VisitLiteral ¶
func (c *Compiler) VisitLiteral(expr expressions.LiteralExpr) string
func (*Compiler) VisitLogical ¶
func (c *Compiler) VisitLogical(expr expressions.LogicalExpr) string
func (*Compiler) VisitReturn ¶
func (c *Compiler) VisitReturn(stmt statements.ReturnStmt) string
func (*Compiler) VisitSlice ¶
func (c *Compiler) VisitSlice(expr expressions.SliceExpr) string
func (*Compiler) VisitStructDeclaration ¶
func (c *Compiler) VisitStructDeclaration(stmt statements.StructDeclarationStmt) string
func (*Compiler) VisitUnary ¶
func (c *Compiler) VisitUnary(expr expressions.UnaryExpr) string
func (*Compiler) VisitVariable ¶
func (c *Compiler) VisitVariable(expr expressions.VariableExpr) string
func (*Compiler) VisitVariableAssignment ¶
func (c *Compiler) VisitVariableAssignment(stmt statements.VariableAssignmentStmt) string
func (*Compiler) VisitVariableDeclaration ¶
func (c *Compiler) VisitVariableDeclaration(stmt statements.VariableDeclarationStmt) string
type TypedIdentifier ¶
type TypedIdentifier struct {
Name string
Type interfaces.ValueType
}
Click to show internal directories.
Click to hide internal directories.