diff options
author | Paul Gilbert | 2019-11-01 22:12:41 -0700 |
---|---|---|
committer | Paul Gilbert | 2019-11-11 18:20:29 -0800 |
commit | e1911f9aff91a2264b6d05c3fda8505bed07739a (patch) | |
tree | afa7503d9d5b5897c65f517dc761859b75958766 /engines/glk/archetype/semantic.cpp | |
parent | fdb5ead5ca91a92c11192e61d23beee90e4caacb (diff) | |
download | scummvm-rg350-e1911f9aff91a2264b6d05c3fda8505bed07739a.tar.gz scummvm-rg350-e1911f9aff91a2264b6d05c3fda8505bed07739a.tar.bz2 scummvm-rg350-e1911f9aff91a2264b6d05c3fda8505bed07739a.zip |
GLK: Fix structures using unions
Diffstat (limited to 'engines/glk/archetype/semantic.cpp')
-rw-r--r-- | engines/glk/archetype/semantic.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/engines/glk/archetype/semantic.cpp b/engines/glk/archetype/semantic.cpp index 4e2cd37205..132f530dfb 100644 --- a/engines/glk/archetype/semantic.cpp +++ b/engines/glk/archetype/semantic.cpp @@ -174,19 +174,19 @@ bool verify_expr(progfile &f, ExprTree the_expr) { switch (the_expr->_kind) { case OPER: - switch (the_expr->_oper.op_name) { + switch (the_expr->_data._oper.op_name) { case OP_DOT: - if (the_expr->_oper.right->_kind != IDENT) { + if (the_expr->_data._oper.right->_kind != IDENT) { error_message(f, "Right side of dot must be an identifier"); success = false; } - else if (the_expr->_oper.right->_ident.ident_kind != ATTRIBUTE_ID) { - the_expr->_oper.right->_ident.ident_int = classify_as(f, - the_expr->_oper.right->_ident.ident_int, ATTRIBUTE_ID, nullptr); + else if (the_expr->_data._oper.right->_data._ident.ident_kind != ATTRIBUTE_ID) { + the_expr->_data._oper.right->_data._ident.ident_int = classify_as(f, + the_expr->_data._oper.right->_data._ident.ident_int, ATTRIBUTE_ID, nullptr); } - the_expr->_oper.right->_ident.ident_kind = ATTRIBUTE_ID; - if (the_expr->_oper.right->_ident.ident_int == 0) + the_expr->_data._oper.right->_data._ident.ident_kind = ATTRIBUTE_ID; + if (the_expr->_data._oper.right->_data._ident.ident_int == 0) success = false; case OP_ASSIGN: @@ -195,17 +195,17 @@ bool verify_expr(progfile &f, ExprTree the_expr) { case OP_C_DIVIDE: case OP_C_PLUS: case OP_C_MINUS: - if (the_expr->_oper.left->_kind == IDENT) { - get_meaning(the_expr->_oper.left->_ident.ident_int, - the_expr->_oper.left->_ident.ident_kind, the_expr->_oper.left->_ident.ident_int); + if (the_expr->_data._oper.left->_kind == IDENT) { + get_meaning(the_expr->_data._oper.left->_data._ident.ident_int, + the_expr->_data._oper.left->_data._ident.ident_kind, the_expr->_data._oper.left->_data._ident.ident_int); - if (the_expr->_oper.left->_ident.ident_kind != ATTRIBUTE_ID) { + if (the_expr->_data._oper.left->_data._ident.ident_kind != ATTRIBUTE_ID) { error_message(f, "Left side of assignment is not an attribute"); success = false; } } - else if (!(the_expr->_oper.left->_kind == OPER && - the_expr->_oper.left->_oper.op_name == OP_DOT)) { + else if (!(the_expr->_data._oper.left->_kind == OPER && + the_expr->_data._oper.left->_data._oper.op_name == OP_DOT)) { error_message(f, "Left side of assignment must reference an attribute"); success = false; } @@ -216,11 +216,11 @@ bool verify_expr(progfile &f, ExprTree the_expr) { } if (success) { - if (Binary[the_expr->_oper.op_name]) - success = verify_expr(f, the_expr->_oper.left); + if (Binary[the_expr->_data._oper.op_name]) + success = verify_expr(f, the_expr->_data._oper.left); } if (success) - success = verify_expr(f, the_expr->_oper.right); + success = verify_expr(f, the_expr->_data._oper.right); break; default: |