Documentation
¶
Index ¶
- Constants
- type Compiler
- func (c *Compiler) Compile(sourceAst ast.Source, symbols *symbol.Table) error
- func (c *Compiler) VisitBinary(b *ast.BinaryExpr) any
- func (c *Compiler) VisitBlock(stmt ast.BlockStmt) any
- func (c *Compiler) VisitCall(f *ast.CallExpr) any
- func (c *Compiler) VisitDotAccess(v *ast.DotAccessExpr) any
- func (c *Compiler) VisitExec(stmt ast.ExecStmt) any
- func (c *Compiler) VisitExpression(stmt ast.ExpressionStmt) any
- func (c *Compiler) VisitFunctionDeclaration(stmt ast.FunctionDeclarationStmt) any
- func (c *Compiler) VisitGrouping(g *ast.GroupingExpr) any
- func (c *Compiler) VisitIf(stmt ast.IfStmt) any
- func (c *Compiler) VisitImport(_ ast.ImportStmt) any
- func (c *Compiler) VisitList(s *ast.ListExpr) any
- func (c *Compiler) VisitLiteral(l *ast.LiteralExpr) any
- func (c *Compiler) VisitLogical(l *ast.LogicalExpr) any
- func (c *Compiler) VisitReturn(stmt ast.ReturnStmt) any
- func (c *Compiler) VisitSetReturnFlag(_ ast.SetReturnFlagStmt) any
- func (c *Compiler) VisitSlice(s *ast.SliceExpr) any
- func (c *Compiler) VisitStructDeclaration(stmt ast.StructDeclarationStmt) any
- func (c *Compiler) VisitUnary(u *ast.UnaryExpr) any
- func (c *Compiler) VisitVariable(v *ast.VariableExpr) any
- func (c *Compiler) VisitVariableAssignment(stmt ast.VariableAssignmentStmt) any
- func (c *Compiler) VisitVariableDeclaration(stmt ast.VariableDeclarationStmt) any
- func (c *Compiler) VisitWhile(_ ast.WhileStmt) any
Constants ¶
View Source
const ( RX = "$RX" RA = "$RA" RB = "$RB" RET = "$RET" // Function return value RETF = "$RETF" // Early return flag CALL = "$CALL" VarPath = "vars" ArgPath = "args" StructPath = "structs" MaxCallCounter = 65536 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compiler ¶
type Compiler struct { Namespace string Scope string DatapackRoot string Config interfaces.ProjectConfig // contains filtered or unexported fields }
func NewCompiler ¶
func NewCompiler( config interfaces.ProjectConfig, libs embed.FS, ) *Compiler
func (*Compiler) VisitBinary ¶
func (c *Compiler) VisitBinary(b *ast.BinaryExpr) any
func (*Compiler) VisitDotAccess ¶ added in v0.2.0
func (c *Compiler) VisitDotAccess(v *ast.DotAccessExpr) any
func (*Compiler) VisitExpression ¶
func (c *Compiler) VisitExpression(stmt ast.ExpressionStmt) any
func (*Compiler) VisitFunctionDeclaration ¶
func (c *Compiler) VisitFunctionDeclaration(stmt ast.FunctionDeclarationStmt) any
func (*Compiler) VisitGrouping ¶
func (c *Compiler) VisitGrouping(g *ast.GroupingExpr) any
func (*Compiler) VisitImport ¶ added in v0.2.0
func (c *Compiler) VisitImport(_ ast.ImportStmt) any
func (*Compiler) VisitLiteral ¶
func (c *Compiler) VisitLiteral(l *ast.LiteralExpr) any
func (*Compiler) VisitLogical ¶
func (c *Compiler) VisitLogical(l *ast.LogicalExpr) any
func (*Compiler) VisitReturn ¶
func (c *Compiler) VisitReturn(stmt ast.ReturnStmt) any
func (*Compiler) VisitSetReturnFlag ¶ added in v0.1.0
func (c *Compiler) VisitSetReturnFlag(_ ast.SetReturnFlagStmt) any
func (*Compiler) VisitStructDeclaration ¶
func (c *Compiler) VisitStructDeclaration(stmt ast.StructDeclarationStmt) any
func (*Compiler) VisitVariable ¶
func (c *Compiler) VisitVariable(v *ast.VariableExpr) any
func (*Compiler) VisitVariableAssignment ¶
func (c *Compiler) VisitVariableAssignment(stmt ast.VariableAssignmentStmt) any
func (*Compiler) VisitVariableDeclaration ¶
func (c *Compiler) VisitVariableDeclaration(stmt ast.VariableDeclarationStmt) any
Click to show internal directories.
Click to hide internal directories.