mirror of
https://github.com/ziglang/zig.git
synced 2025-12-16 03:03:09 +00:00
Update Tokenizer Dump Function
fix missed `loc` field
This commit is contained in:
parent
2c8541bdde
commit
a4df443f96
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user