aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2025-05-28 16:46:57 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2025-05-28 16:46:57 +0200
commitd138a622dcc77302cc452c52946f6202b6a03f5e (patch)
treee5fb765accca5af0fe6c0877c15d1b60055c94a4
parent011e8e2ec2d7900d5c8d26f43f3b91999427be61 (diff)
move to zig 0.14.1HEADmaster
-rw-r--r--README.md4
-rw-r--r--build.zig.zon4
-rw-r--r--src/recognizer.zig2
-rw-r--r--src/scheduler.zig2
4 files changed, 9 insertions, 3 deletions
diff --git a/README.md b/README.md
index ebed7d7..f65887a 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,9 @@
# MRY
+> IMPORTANT:
+> This project is developed using zig version `0.14.1`.
+> Since the zig std is changing between releases it is recommended to use this version.
+
## Grammar Files
The grammar file needs to be in the following format:
diff --git a/build.zig.zon b/build.zig.zon
index 7c468cb..c53de0c 100644
--- a/build.zig.zon
+++ b/build.zig.zon
@@ -6,7 +6,7 @@
//
// It is redundant to include "zig" in this name because it is already
// within the Zig package namespace.
- .name = "gll",
+ .name = .gll,
// This is a [Semantic Version](https://semver.org/).
// In a future version of Zig it will be used for package deduplication.
@@ -69,4 +69,6 @@
//"LICENSE",
//"README.md",
},
+
+ .fingerprint = 0x3f950d6f3713543a,
}
diff --git a/src/recognizer.zig b/src/recognizer.zig
index a6fe721..1934750 100644
--- a/src/recognizer.zig
+++ b/src/recognizer.zig
@@ -133,7 +133,7 @@ pub fn check(grammar: *Grammar, input: []const u8, inner_allocator: std.mem.Allo
for (processing_queue.items) |base| {
try forward_queue.append(.{ base.state, base });
- while (forward_queue.popOrNull()) |checkpoint| {
+ while (forward_queue.pop()) |checkpoint| {
const last_state, const last_node = checkpoint;
const rule = grammar.non_terminal_by_id(last_state.id).rules()[last_state.rule_index];
diff --git a/src/scheduler.zig b/src/scheduler.zig
index b2ab0db..9034a84 100644
--- a/src/scheduler.zig
+++ b/src/scheduler.zig
@@ -2,7 +2,7 @@ const std = @import("std");
pub fn Scheduler(function: anytype) type {
const FuncType = @TypeOf(function);
- const func_info = @typeInfo(FuncType).Fn;
+ const func_info = @typeInfo(FuncType).@"fn";
const R = func_info.return_type orelse std.builtin.Type.Void;
const ArgType = std.meta.ArgsTuple(FuncType);