summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorNic Gaffney <gaffney_nic@protonmail.com>2024-07-27 00:31:28 -0500
committerNic Gaffney <gaffney_nic@protonmail.com>2024-07-27 00:31:28 -0500
commit2605d1e8aa158e8fce80853cf064cc5e2e41e0a9 (patch)
tree081edf18e84d22306e7c04c28d594f1ccfac14dc /build.zig
parent8f55e2fa7059ef215a1b8369300f0a85103b079b (diff)
downloadcalico-2605d1e8aa158e8fce80853cf064cc5e2e41e0a9.tar.gz
Completely removed ast code and restructured
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig20
1 files changed, 14 insertions, 6 deletions
diff --git a/build.zig b/build.zig
index 1894e3f..809f140 100644
--- a/build.zig
+++ b/build.zig
@@ -31,24 +31,32 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
});
- const ast_unit_tests = b.addTest(.{
- .root_source_file = b.path("src/ast.zig"),
+ const token_unit_tests = b.addTest(.{
+ .root_source_file = b.path("src/tokenize.zig"),
.target = target,
.optimize = optimize,
});
- const token_unit_tests = b.addTest(.{
- .root_source_file = b.path("src/tokenize.zig"),
+ const parse_unit_tests = b.addTest(.{
+ .root_source_file = b.path("src/parser.zig"),
+ .target = target,
+ .optimize = optimize,
+ });
+
+ const codegen_unit_tests = b.addTest(.{
+ .root_source_file = b.path("src/codegen.zig"),
.target = target,
.optimize = optimize,
});
const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests);
- const run_ast_unit_tests = b.addRunArtifact(ast_unit_tests);
const run_token_unit_tests = b.addRunArtifact(token_unit_tests);
+ const run_parse_unit_tests = b.addRunArtifact(parse_unit_tests);
+ const run_codegen_unit_tests = b.addRunArtifact(codegen_unit_tests);
const test_step = b.step("test", "Run unit tests");
test_step.dependOn(&run_exe_unit_tests.step);
- test_step.dependOn(&run_ast_unit_tests.step);
test_step.dependOn(&run_token_unit_tests.step);
+ test_step.dependOn(&run_parse_unit_tests.step);
+ test_step.dependOn(&run_codegen_unit_tests.step);
}