authorgravatar for 63465728+AliChraghi@users.noreply.github.comAli Chraghi <63465728+AliChraghi@users.noreply.github.com> 2022-02-21 00:58:59+03:30
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-02-20 17:47:42-05:00
loga4df443f966514a7dedbe3eec4bd3303cf1797c1
treecedcb482f5682c151f3fa7773a7e417f73ae7e52
parent2c8541bdde0b5ffd291600639b6123e512496923

Update Tokenizer Dump Function

fix missed `loc` field

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/zig/tokenizer.zig+1-1
......@@ -345,7 +345,7 @@ pub const Tokenizer = struct {
345345
346346 /// For debugging purposes
347347 pub fn dump(self: *Tokenizer, token: *const Token) void {
348 std.debug.print("{s} \"{s}\"\n", .{ @tagName(token.tag), self.buffer[token.start..token.end] });
348 std.debug.print("{s} \"{s}\"\n", .{ @tagName(token.tag), self.buffer[token.loc.start..token.loc.end] });
349349 }
350350
351351 pub fn init(buffer: [:0]const u8) Tokenizer {