--- /dev/null
+const std = @import("std");
+
+pub fn build(b: *std.Build) void {
+ const exe = b.addExecutable(.{
+ .name = "zlox",
+ .root_module = b.createModule(.{
+ .root_source_file = b.path("src/main.zig"),
+ .target = b.standardTargetOptions(.{}),
+ .optimize = b.standardOptimizeOption(.{}),
+ }),
+ });
+
+ b.installArtifact(exe);
+
+ const run_step = b.step("run", "Run the app");
+ const run_cmd = b.addRunArtifact(exe);
+ run_step.dependOn(&run_cmd.step);
+ run_cmd.step.dependOn(b.getInstallStep());
+
+ if (b.args) |args| {
+ run_cmd.addArgs(args);
+ }
+}
--- /dev/null
+.{
+ .name = .zlox,
+ .version = "0.0.0",
+ .fingerprint = 0xd8b023c660b945d7,
+ .minimum_zig_version = "0.15.2",
+
+ .paths = .{
+ "build.zig",
+ "build.zig.zon",
+ "src",
+ },
+}
const Literal = Token.Literal;
const Scanner = @This();
const TokenType = @import("token_type.zig").TokenType;
-const lox = @import("lox.zig");
+const lox = @import("main.zig");
source: []const u8,
tokens: std.ArrayList(Token) = .empty,