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/statement.h | |
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/statement.h')
-rw-r--r-- | engines/glk/archetype/statement.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/engines/glk/archetype/statement.h b/engines/glk/archetype/statement.h index 0be8c1b9a0..62c2095797 100644 --- a/engines/glk/archetype/statement.h +++ b/engines/glk/archetype/statement.h @@ -34,7 +34,7 @@ enum StatementKind { ST_DESTROY, ST_WRITE, ST_WRITES, ST_STOP, CONT_SEQ, END_SEQ }; -union StatementType; +struct StatementType; typedef StatementType *StatementPtr; struct StmtCompound { @@ -74,8 +74,7 @@ struct StmtWrite { ListType print_list; }; -union StatementType { - StatementKind _kind; +union StatementTypeData { StmtCompound _compound; StmtExpr _expr; StmtIf _if; @@ -86,6 +85,11 @@ union StatementType { StmtWrite _write; }; +struct StatementType { + StatementKind _kind; + StatementTypeData _data; +}; + struct CasePairType { ExprTree value; StatementPtr action; |