mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-23 03:22:08 +00:00
Reinstate RL into the _RS family
Removal of colon-less labels lifted the grammar ambiguity that prevented `RL` from being usable as a variable declarator. Thus, reinstate its functionality.
This commit is contained in:
@@ -450,7 +450,7 @@ static inline void failAssertMsg(enum AssertionType type, char const *msg)
|
||||
%token T_POP_SECTION T_POP_FRAGMENT
|
||||
%token T_POP_RB
|
||||
%token T_POP_RW
|
||||
%token T_POP_RL
|
||||
// There is no T_POP_RL, only T_Z80_RL
|
||||
%token T_POP_MACRO
|
||||
%token T_POP_ENDM
|
||||
%token T_POP_RSRESET T_POP_RSSET
|
||||
@@ -864,7 +864,7 @@ rs_uconst : /* empty */ {
|
||||
| uconst
|
||||
;
|
||||
|
||||
rl : T_LABEL T_POP_RL rs_uconst {
|
||||
rl : T_LABEL T_Z80_RL rs_uconst {
|
||||
sym_AddEqu($1, sym_GetConstantValue("_RS"));
|
||||
sym_AddSet("_RS", sym_GetConstantValue("_RS") + 4 * $3);
|
||||
}
|
||||
|
||||
@@ -971,7 +971,6 @@ There are five commands in the RS group of commands:
|
||||
.It Ic RB Ar constexpr Ta Sets the preceding symbol to Ic _RS No and adds Ar constexpr No to Ic _RS .
|
||||
.It Ic RW Ar constexpr Ta Sets the preceding symbol to Ic _RS No and adds Ar constexpr No * 2 to Ic _RS .
|
||||
.It Ic RL Ar constexpr Ta Sets the preceding symbol to Ic _RS No and adds Ar constexpr No * 4 to Ic _RS .
|
||||
(In practice, this one cannot be used due to a bug).
|
||||
.El
|
||||
.Pp
|
||||
If the argument to
|
||||
|
||||
Reference in New Issue
Block a user