aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Chraghi <63465728+AliChraghi@users.noreply.github.com>2022-02-21 00:58:59 +0330
committerAndrew Kelley <andrew@ziglang.org>2022-02-20 17:47:42 -0500
commita4df443f966514a7dedbe3eec4bd3303cf1797c1 (patch)
treecedcb482f5682c151f3fa7773a7e417f73ae7e52
parent2c8541bdde0b5ffd291600639b6123e512496923 (diff)
downloadzig-a4df443f966514a7dedbe3eec4bd3303cf1797c1.tar.gz
zig-a4df443f966514a7dedbe3eec4bd3303cf1797c1.zip
Update Tokenizer Dump Function
fix missed `loc` field
-rw-r--r--lib/std/zig/tokenizer.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/zig/tokenizer.zig b/lib/std/zig/tokenizer.zig
index 76b14df877..8a0885ab7b 100644
--- a/lib/std/zig/tokenizer.zig
+++ b/lib/std/zig/tokenizer.zig
@@ -345,7 +345,7 @@ pub const Tokenizer = struct {
/// For debugging purposes
pub fn dump(self: *Tokenizer, token: *const Token) void {
- std.debug.print("{s} \"{s}\"\n", .{ @tagName(token.tag), self.buffer[token.start..token.end] });
+ std.debug.print("{s} \"{s}\"\n", .{ @tagName(token.tag), self.buffer[token.loc.start..token.loc.end] });
}
pub fn init(buffer: [:0]const u8) Tokenizer {