]> Repositories - zlox.git/blobdiff - src/main.zig
Remove unnecessary error logic
[zlox.git] / src / main.zig
index 0e41f10eef16372fddbe6e825628bd0146a8f167..a17dbd73fe1b6e874ef360d0b4795c5b1b1220a9 100644 (file)
@@ -71,7 +71,7 @@ fn run(allocator: Allocator, source: []const u8) !void {
     std.debug.print("{s}\n", .{printed});
 }
 
-pub fn @"error"(line: u32, message: []const u8) !void {
+pub fn scanError(line: u32, message: []const u8) !void {
     try report(line, "", message);
 }
 
@@ -85,7 +85,7 @@ fn report(line: u32, where: []const u8, message: []const u8) !void {
     hadError = true;
 }
 
-pub fn parse_error(allocator: Allocator, token: Token, message: []const u8) !void {
+pub fn parseError(allocator: Allocator, token: Token, message: []const u8) !void {
     if (token.type == .eof) {
         try report(token.line, " at end", message);
     } else {