Commit a4df443f96

Ali Chraghi <63465728+AliChraghi@users.noreply.github.com>
2022-02-20 22:28:59
Update Tokenizer Dump Function
fix missed `loc` field
1 parent 2c8541b
Changed files (1)
lib
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 {