19 lines
274 B
Go
19 lines
274 B
Go
package core
|
|
|
|
import (
|
|
"git.urbach.dev/cli/q/src/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
|
|
}
|