mirror of
https://github.com/gbdev/rgbds.git
synced 2026-06-17 06:02:13 +00:00
Use the name of sym_GetPC() instead of hard-coding "@" again
This commit is contained in:
+3
-6
@@ -1688,10 +1688,8 @@ static Token yylex_NORMAL() {
|
|||||||
case '?':
|
case '?':
|
||||||
return Token(T_(QUESTIONMARK));
|
return Token(T_(QUESTIONMARK));
|
||||||
|
|
||||||
case '@': {
|
case '@':
|
||||||
std::string symName("@");
|
return Token(T_(SYMBOL), sym_GetPC()->name);
|
||||||
return Token(T_(SYMBOL), symName);
|
|
||||||
}
|
|
||||||
|
|
||||||
case '(':
|
case '(':
|
||||||
return Token(T_(LPAREN));
|
return Token(T_(LPAREN));
|
||||||
@@ -1773,8 +1771,7 @@ static Token yylex_NORMAL() {
|
|||||||
case ':': // Either :, ::, or an anonymous label ref
|
case ':': // Either :, ::, or an anonymous label ref
|
||||||
c = peek();
|
c = peek();
|
||||||
if (c == '+' || c == '-') {
|
if (c == '+' || c == '-') {
|
||||||
std::string symName = readAnonLabelRef(c);
|
return Token(T_(ANON), readAnonLabelRef(c));
|
||||||
return Token(T_(ANON), symName);
|
|
||||||
}
|
}
|
||||||
return oneOrTwo(':', T_(DOUBLE_COLON), T_(COLON));
|
return oneOrTwo(':', T_(DOUBLE_COLON), T_(COLON));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user