]> Repositories - zlox.git/blobdiff - src/Parser.zig
Fix shadowing mistake
[zlox.git] / src / Parser.zig
index bcc6ee69ec721ae945afc0a56d667ec54dba8174..762edb8f22c4712334d97d179aea014a042a0426 100644 (file)
@@ -27,9 +27,9 @@ pub fn deinit(self: *Parser) void {
 pub fn parse(self: *Parser) !?*Expr {
     self.allocator = self.arena.allocator();
 
 pub fn parse(self: *Parser) !?*Expr {
     self.allocator = self.arena.allocator();
 
-    return self.expression() catch |err| switch (err) {
+    return self.expression() catch |err2| switch (err2) {
         error.ParseError => return null,
         error.ParseError => return null,
-        else => return err,
+        else => return err2,
     };
 }
 
     };
 }