From 370520949f834ca1ed7d2913c5ed13092947f437 Mon Sep 17 00:00:00 2001
From: Christofer Nolander <christofer@nolander.me>
Date: Wed, 31 Jul 2024 09:46:49 +0200
Subject: [PATCH] update to zig 0.13.0

---
 .gitignore    |  2 +-
 build.zig     | 10 +++++-----
 src/parse.zig |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/.gitignore b/.gitignore
index 363d5cc..78bf709 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
 zig-out
-zig-cache
+.zig-cache
 stderr.log
 __pycache__
 .venv
diff --git a/build.zig b/build.zig
index e89b121..cb0706f 100644
--- a/build.zig
+++ b/build.zig
@@ -24,7 +24,7 @@ pub fn build(b: *std.Build) !void {
     {
         const unit_tests = b.addTest(.{
             .name = "unit-tests",
-            .root_source_file = .{ .path = "src/main.zig" },
+            .root_source_file = b.path("src/main.zig"),
             .target = target,
             .optimize = optimize,
         });
@@ -75,7 +75,7 @@ fn addExecutable(b: *std.Build, options: struct {
 }) !*std.Build.Step.Compile {
     const exe = b.addExecutable(.{
         .name = "glsl_analyzer",
-        .root_source_file = .{ .path = "src/main.zig" },
+        .root_source_file = b.path("src/main.zig"),
         .target = options.target,
         .optimize = options.optimize,
     });
@@ -88,7 +88,7 @@ fn attachModules(step: *std.Build.Step.Compile) !void {
 
     step.linkLibC();
 
-    const compressed_spec = try CompressStep.create(b, "spec.json.zlib", .{ .path = b.pathFromRoot("spec/spec.json") });
+    const compressed_spec = try CompressStep.create(b, "spec.json.zlib", b.path("spec/spec.json"));
     step.root_module.addAnonymousImport("glsl_spec.json.zlib", .{ .root_source_file = compressed_spec.getOutput() });
 
     const options = b.addOptions();
@@ -123,10 +123,10 @@ const CompressStep = struct {
     }
 
     pub fn getOutput(self: *@This()) std.Build.LazyPath {
-        return .{ .generated = &self.generated_file };
+        return .{ .generated = .{ .file = &self.generated_file } };
     }
 
-    fn make(step: *std.Build.Step, _: *std.Progress.Node) anyerror!void {
+    fn make(step: *std.Build.Step, _: std.Progress.Node) anyerror!void {
         const b = step.owner;
         const self: *@This() = @fieldParentPtr("step", step);
         const input_path = self.input.getPath(b);
diff --git a/src/parse.zig b/src/parse.zig
index 15451ea..4e96ba0 100644
--- a/src/parse.zig
+++ b/src/parse.zig
@@ -1588,7 +1588,7 @@ pub const Tokenizer = struct {
                 }
             }
 
-            break :blk std.ComptimeStringMap(Tag, table.slice());
+            break :blk std.StaticStringMap(Tag).initComptime(table.slice());
         };
 
         return map.get(identifier) orelse .identifier;