Allow integer literals in FOLD rules.

Workaround before refactoring conversion ops.
This commit is contained in:
Mike Pall 2010-12-09 16:11:15 +01:00
parent e9cab5a763
commit 36fed9f3e1

View File

@ -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 {