2
0
Эх сурвалжийг харах

Fix `is_operand_value` to support more addressing modes

gingerBill 6 жил өмнө
parent
commit
2780f82f30
1 өөрчлөгдсөн 3 нэмэгдсэн , 1 устгасан
  1. 3 1
      src/checker.cpp

+ 3 - 1
src/checker.cpp

@@ -7,10 +7,12 @@ void check_expr(CheckerContext *c, Operand *operand, Ast *expression);
 bool is_operand_value(Operand o) {
 	switch (o.mode) {
 	case Addressing_Value:
-	case Addressing_Variable:
 	case Addressing_Immutable:
+	case Addressing_Context:
+	case Addressing_Variable:
 	case Addressing_Constant:
 	case Addressing_MapIndex:
+	case Addressing_OptionalOk:
 		return true;
 	}
 	return false;