Separated compiler into its own package
This commit is contained in:
parent
38043ca12a
commit
61dc691c65
14 changed files with 199 additions and 167 deletions
|
@ -4,7 +4,7 @@ import (
|
|||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"git.akyoto.dev/cli/q/src/build/core"
|
||||
"git.akyoto.dev/cli/q/src/build/compiler"
|
||||
"git.akyoto.dev/cli/q/src/build/scanner"
|
||||
)
|
||||
|
||||
|
@ -21,9 +21,9 @@ func New(files ...string) *Build {
|
|||
}
|
||||
|
||||
// Run parses the input files and generates an executable file.
|
||||
func (build *Build) Run() (core.Result, error) {
|
||||
func (build *Build) Run() (compiler.Result, error) {
|
||||
functions, errors := scanner.Scan(build.Files)
|
||||
return core.Compile(functions, errors)
|
||||
return compiler.Compile(functions, errors)
|
||||
}
|
||||
|
||||
// Executable returns the path to the executable.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue