Skip to content

Commit

Permalink
add special case for is_assign_op
Browse files Browse the repository at this point in the history
  • Loading branch information
on-keyday committed Dec 30, 2024
1 parent ca0f1cb commit 5cf677b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/ast/expr_layer.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ namespace brgen::ast {
constexpr bool is_assign_op(BinaryOp op) {
constexpr auto begin = int(BinaryOp::assign);
constexpr auto end = int(BinaryOp::bit_xor_assign);
return begin <= int(op) && int(op) <= end;
return begin <= int(op) && int(op) <= end ||
op == BinaryOp::in_assign || op == BinaryOp::append_assign; // special case
}

constexpr bool is_define_op(BinaryOp op) {
Expand Down

0 comments on commit 5cf677b

Please sign in to comment.