aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/parse.zig6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/parse.zig b/src/parse.zig
index 08dcc81..6ed1b79 100644
--- a/src/parse.zig
+++ b/src/parse.zig
@@ -179,8 +179,10 @@ pub fn parsePrimaryExpr(allocator: Allocator, lexer: *Lexer) !*Expr {
fn mustEat(lexer: *Lexer, ty: Lexer.Token.Type) !Lexer.Token {
const token = lexer.next();
- std.debug.print("Expected {}. Got {}\n", .{ ty, token.type });
- if (token.type != ty) return error.UnexpectedToken;
+ if (token.type != ty) {
+ std.debug.print("Expected {}. Got {}\n", .{ ty, token.type });
+ return error.UnexpectedToken;
+ }
return token;
}