Allow BANK() in constexpr expressions

This commit is contained in:
ISSOtm
2019-12-07 23:43:02 +01:00
parent e4f4706508
commit b49e025703
3 changed files with 47 additions and 0 deletions

View File

@@ -1394,6 +1394,14 @@ const : T_ID { constexpr_Symbol(&$$, $1); }
| T_NUMBER { constexpr_Number(&$$, $1); }
| T_OP_HIGH '(' const ')' { constexpr_UnaryOp(&$$, $1, &$3); }
| T_OP_LOW '(' const ')' { constexpr_UnaryOp(&$$, $1, &$3); }
| T_OP_BANK '(' T_ID ')'
{
constexpr_BankSymbol(&$$, $3);
}
| T_OP_BANK '(' string ')'
{
constexpr_BankSection(&$$, $3);
}
| string
{
char *s = $1;