Improved tokenizer
This commit is contained in:
parent
5c12992fca
commit
c4b28fb66e
10 changed files with 57 additions and 53 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"git.akyoto.dev/cli/q/src/compiler"
|
||||
"git.akyoto.dev/cli/q/src/elf"
|
||||
"git.akyoto.dev/cli/q/src/errors"
|
||||
)
|
||||
|
@ -12,7 +13,6 @@ import (
|
|||
// Build describes a compiler build.
|
||||
type Build struct {
|
||||
Directory string
|
||||
Verbose bool
|
||||
WriteExecutable bool
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ func (build *Build) Run() error {
|
|||
return &errors.InvalidDirectory{Path: build.Directory}
|
||||
}
|
||||
|
||||
functions, err := build.Compile()
|
||||
functions, err := compiler.Compile(build.Directory)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -46,7 +46,7 @@ func (build *Build) Run() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
code, data := build.Finalize(functions)
|
||||
code, data := compiler.Finalize(functions)
|
||||
return writeToDisk(build.Executable(), code, data)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue