Fix many lexer bugs

More to come...
This commit is contained in:
ISSOtm
2020-08-14 21:11:44 +02:00
parent df75fd2ec2
commit cd747d8175
38 changed files with 188 additions and 107 deletions

View File

@@ -28,10 +28,13 @@ uint32_t calchash(const char *s)
return hash;
}
char const *print(char c)
char const *print(int c)
{
static char buf[5]; /* '\xNN' + '\0' */
if (c == EOF)
return "EOF";
if (isprint(c)) {
buf[0] = c;
buf[1] = '\0';