From 5cf677b97a23b257951add338a05ceeab6360668 Mon Sep 17 00:00:00 2001 From: on-keyday <62627905+on-keyday@users.noreply.github.com> Date: Tue, 31 Dec 2024 02:52:39 +0900 Subject: [PATCH] add special case for is_assign_op --- src/core/ast/expr_layer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/ast/expr_layer.h b/src/core/ast/expr_layer.h index 415d4052..244964f0 100644 --- a/src/core/ast/expr_layer.h +++ b/src/core/ast/expr_layer.h @@ -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) {