diff options
Diffstat (limited to 'src/char-set.zig')
| -rw-r--r-- | src/char-set.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/char-set.zig b/src/char-set.zig index d244540..55c719c 100644 --- a/src/char-set.zig +++ b/src/char-set.zig @@ -4,7 +4,7 @@ const Character = @import("character.zig").Character; const Self = @This(); -charset: [256]bool = std.mem.zeroes([256]bool), +charset: [258]bool = std.mem.zeroes([258]bool), pub inline fn is_set(self: *const Self, c: usize) bool { return self.charset[c]; @@ -48,8 +48,8 @@ pub fn format( try writer.print("}}", .{}); } -pub fn expect(self: *const Self, expected: []const u8) !void { - var matrix = std.mem.zeroes([255]bool); +pub fn expect(self: *const Self, expected: []const u9) !void { + var matrix = std.mem.zeroes([258]bool); for (expected) |c| { matrix[c] = true; @@ -65,7 +65,7 @@ pub fn expect(self: *const Self, expected: []const u8) !void { } else if (c == Character.END) { std.debug.print("$ ", .{}); } else { - std.debug.print("'{c}' ", .{c}); + std.debug.print("'{c}' ", .{@as(u8, @truncate(c))}); } } |