mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 18:52:07 +00:00
Make sure that parsed subexpressions are fully defined
We were not initializing some expressions, and they were using the values of the previous expressions instead. This just so happened to not crash the tests, and to sometimes even give valid results (although `BANK()` of a non-label symbol being $4B4E4142, the ASCII balue of "BANK", was something we missed).
This commit is contained in:
@@ -1676,12 +1676,13 @@ sectattrs:
|
||||
$$.bank = -1;
|
||||
}
|
||||
| sectattrs T_COMMA T_OP_ALIGN T_LBRACK align_spec T_RBRACK {
|
||||
$$ = $1;
|
||||
$$.alignment = $5.alignment;
|
||||
$$.alignOfs = $5.alignOfs;
|
||||
}
|
||||
| sectattrs T_COMMA T_OP_BANK T_LBRACK uconst T_RBRACK {
|
||||
// We cannot check the validity of this now
|
||||
$$.bank = $5;
|
||||
$$ = $1;
|
||||
$$.bank = $5; // We cannot check the validity of this yet
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user