lexer + parser: add formatting for enums + build script: spaces -> tabs

This commit is contained in:
2026-04-17 20:20:31 +02:00
parent f09a36fb27
commit 055f56fcc2
6 changed files with 91 additions and 30 deletions

View File

@@ -1,38 +1,38 @@
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const root_module = b.createModule(.{
.target = target,
.optimize = optimize,
.link_libc = true, // TODO: no more libc
});
const root_module = b.createModule(.{
.target = target,
.optimize = optimize,
.link_libc = true, // TODO: no more libc
});
const c = b.addExecutable(.{
.name = "noom",
.root_module = root_module,
});
const c = b.addExecutable(.{
.name = "noom",
.root_module = root_module,
});
c.root_module.addCSourceFiles(.{
.files = &[_][]const u8{
"src/helper.c",
"src/lexer.c",
"src/parser.c",
"src/main.c",
}
});
c.root_module.addCSourceFiles(.{
.files = &[_][]const u8{
"src/helper.c",
"src/lexer.c",
"src/parser.c",
"src/main.c",
}
});
b.installArtifact(c);
b.installArtifact(c);
const run_cmd = b.addRunArtifact(c);
run_cmd.step.dependOn(b.getInstallStep());
const run_cmd = b.addRunArtifact(c);
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);
}
if (b.args) |args| {
run_cmd.addArgs(args);
}
const run = b.step("run", "Build and run the project");
run.dependOn(&run_cmd.step);
const run = b.step("run", "Build and run the project");
run.dependOn(&run_cmd.step);
}