zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 4617c5907a4b7933947a3223d19d637d143fd705 (tree)
parent 82225f6568969856ffe9363d2b8b0f39548bd9df
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Wed, 20 May 2020 00:19:00 -0400

fix zig fmt test regressions

Diffstat:
Mlib/std/zig/parse.zig | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/std/zig/parse.zig b/lib/std/zig/parse.zig @@ -3296,11 +3296,9 @@ const Parser = struct { .index = p.tok_i, .ptr = &p.tokens[p.tok_i], }; - if (p.tokens[p.tok_i].id == .Eof) { - return result; - } p.tok_i += 1; assert(result.ptr.id != .LineComment); + if (p.tok_i >= p.tokens.len) return result; while (true) { const next_tok = p.tokens[p.tok_i];