Skip to content

Commit

Permalink
fix(Parser): Set ErrorContext.setErr() when error is captured on else
Browse files Browse the repository at this point in the history
  • Loading branch information
PrajwalCH committed Sep 1, 2022
1 parent 9809da2 commit 98aee00
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/parser/Parser.zig
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ fn parseCommandArgument(self: *Parser) Error!void {
InternalError.ArgValueNotProvided,
InternalError.EmptyArgValueNotAllowed,
=> break,
else => |e| return e,
else => |e| {
self.err_ctx.setErr(e);
return e;
},
};
}
}
Expand Down

0 comments on commit 98aee00

Please sign in to comment.