aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-11-10 16:40:29 +0100
committerBad Diode <bd@badd10de.dev>2021-11-10 16:40:29 +0100
commit69f6b03296f96a60dd7fc103ff89d187f1a29aec (patch)
treeb942b1afb25f6c6db2fa6be861406c1446026f8c /src/main.c
parente32231ffa4dfc4b5c3c65437f03190e57ccc9678 (diff)
downloadbdl-69f6b03296f96a60dd7fc103ff89d187f1a29aec.tar.gz
bdl-69f6b03296f96a60dd7fc103ff89d187f1a29aec.zip
Change Environment to store locals in array
This will help directly translate the locals to assembly.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index cf4bfa4..8962519 100644
--- a/src/main.c
+++ b/src/main.c
@@ -33,7 +33,7 @@ process_source(const StringView *source, const char *file_name) {
33 } 33 }
34 34
35 // Parser. 35 // Parser.
36 Root *roots = parse(tokens, &errors); 36 Program program = parse(tokens, &errors);
37 if (errors.n != 0) { 37 if (errors.n != 0) {
38 report_errors(&errors, file_name); 38 report_errors(&errors, file_name);
39 free_objects(); 39 free_objects();
@@ -45,7 +45,7 @@ process_source(const StringView *source, const char *file_name) {
45 // TODO: Optimization. 45 // TODO: Optimization.
46 46
47 // Compilation. 47 // Compilation.
48 compile(roots); 48 compile(program.roots);
49 49
50 // Free resources. 50 // Free resources.
51 free_objects(); 51 free_objects();