+
+pub fn parseError(allocator: Allocator, token: Token, message: []const u8) !void {
+ if (token.type == .eof) {
+ try report(token.line, " at end", message);
+ } else {
+ try report(token.line, try std.fmt.allocPrint(allocator, " at '{s}'", .{token.lexeme}), message);
+ }
+}