mirror of
https://github.com/hazemKrimi/jack-compiler.git
synced 2026-05-01 17:48:57 +00:00
chore: rename parser to compilation engine
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/hazemKrimi/jack-compiler/internal/parser"
|
"github.com/hazemKrimi/jack-compiler/internal/compilation-engine"
|
||||||
"github.com/hazemKrimi/jack-compiler/internal/tokenizer"
|
"github.com/hazemKrimi/jack-compiler/internal/tokenizer"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -26,7 +26,12 @@ func process(inputPath string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
parsed := parser.ParseTokens(tokens)
|
parsed, err := parser.ParseTokens(tokens)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
outputPath := strings.Replace(inputPath, ".jack", ".xml", 1)
|
outputPath := strings.Replace(inputPath, ".jack", ".xml", 1)
|
||||||
|
|
||||||
if err := os.WriteFile(outputPath, []byte(parsed), 0644); err != nil {
|
if err := os.WriteFile(outputPath, []byte(parsed), 0644); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user