Fix range in statement bug caused by incorrectly assigned addressing mode #461

This commit is contained in:
gingerBill
2019-11-02 10:57:42 +00:00
parent f9aaff99c6
commit dbdbbcd60f
4 changed files with 11 additions and 90 deletions

View File

@@ -1033,7 +1033,9 @@ void add_type_and_value(CheckerInfo *i, Ast *expr, AddressingMode mode, Type *ty
expr->tav.mode = mode;
expr->tav.type = type;
expr->tav.value = value;
if (mode == Addressing_Constant || mode == Addressing_Invalid) {
expr->tav.value = value;
}
}
void add_entity_definition(CheckerInfo *i, Ast *identifier, Entity *entity) {