Added scope package
This commit is contained in:
src/build
core
AddVariable.goComment.goCompare.goCompile.goCompileAST.goCompileASTNode.goCompileAssign.goCompileCall.goCompileCondition.goCompileDefinition.goCompileIf.goCompileLoop.goCompileTokens.goExecute.goExecuteLeaf.goExpressionToRegister.goFunction.goInstructions.goJumpIfFalse.goJumpIfTrue.goNewFunction.goPrintInstructions.goSaveRegister.goScope.goTokenToRegister.goVariable.goVariableByName.goVariableInRegister.goidentifierExists.gopostInstruction.gostoreVariableInRegister.gouseVariable.go
scanner
scope
18
src/build/core/CompileAST.go
Normal file
18
src/build/core/CompileAST.go
Normal file
@ -0,0 +1,18 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
"git.akyoto.dev/cli/q/src/build/ast"
|
||||
)
|
||||
|
||||
// CompileAST compiles an abstract syntax tree.
|
||||
func (f *Function) CompileAST(tree ast.AST) error {
|
||||
for _, node := range tree {
|
||||
err := f.CompileASTNode(node)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user