mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 07:34:07 +00:00
Allow integer literals in FOLD rules.
Workaround before refactoring conversion ops.
This commit is contained in:
parent
e9cab5a763
commit
36fed9f3e1
@ -110,6 +110,11 @@ static uint32_t nexttoken(char **pp, int allowlit, int allowany)
|
|||||||
for (i = 0; ircall_names[i]; i++)
|
for (i = 0; ircall_names[i]; i++)
|
||||||
if (!strcmp(ircall_names[i], p+7))
|
if (!strcmp(ircall_names[i], p+7))
|
||||||
return i;
|
return i;
|
||||||
|
} else if (allowlit && *p >= '0' && *p <= '9') {
|
||||||
|
for (i = 0; *p >= '0' && *p <= '9'; p++)
|
||||||
|
i = i*10 + (*p - '0');
|
||||||
|
if (*p == '\0')
|
||||||
|
return i;
|
||||||
} else if (allowany && !strcmp("any", p)) {
|
} else if (allowany && !strcmp("any", p)) {
|
||||||
return 0xff;
|
return 0xff;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user