diff options
Diffstat (limited to 'src/zisp/io/Parser.zig')
| -rw-r--r-- | src/zisp/io/Parser.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/zisp/io/Parser.zig b/src/zisp/io/Parser.zig index cddd397..29b8590 100644 --- a/src/zisp/io/Parser.zig +++ b/src/zisp/io/Parser.zig @@ -84,14 +84,14 @@ pub const Error = enum { pub const Context = struct { /// What to do next. - next: ?Fn = undefined, + next: ?Fn = null, /// For storing a context value, like datum to join in join syntax. - val: Value = undefined, + val: Value = value.none, /// For storing a context char, like list opening bracket. - char: u8 = undefined, + char: u8 = 0, /// Start index of list elements on current parse level, within the global /// list element accumulation array. - list_start: usize = undefined, + list_start: usize = 0, /// Are we in a comment? comment: bool = false, }; @@ -178,7 +178,7 @@ fn readNoEof(p: *Parser, comptime emsg: []const u8) !u8 { // Fake optional, for use in: while (readNoEofOpt()) |c| { } fn readNoEofOpt(p: *Parser, comptime emsg: []const u8) !?u8 { - return try p.read() orelse p.err(.UnexpectedEof, emsg); + return try p.readNoEof(emsg); } fn unread(p: *Parser, c: u8) void { |
