mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 19:40:18 +00:00
Update lexer.h
This commit is contained in:
parent
084725e2b3
commit
e33d9fe595
@ -38,7 +38,13 @@ constexpr TokenIndex TK(const char token[]) {
|
|||||||
while(*i && *j && *i == *j) { i++; j++;}
|
while(*i && *j && *i == *j) { i++; j++;}
|
||||||
if(*i == *j) return k;
|
if(*i == *j) return k;
|
||||||
}
|
}
|
||||||
|
#ifdef __GNUC__
|
||||||
|
// for old version of gcc, it is not smart enough to ignore FATAL_ERROR()
|
||||||
|
// so we must do a normal return
|
||||||
|
return 255;
|
||||||
|
#else
|
||||||
FATAL_ERROR();
|
FATAL_ERROR();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#define TK_STR(t) kTokens[t]
|
#define TK_STR(t) kTokens[t]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user