Merge pull request #2454 from amaanq/eof-unused

fix: suppress unused warnings for eof
This commit is contained in:
Amaan Qureshi 2023-08-01 09:09:02 -04:00 committed by GitHub
commit 981bad03d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,9 +130,16 @@ struct TSLanguage {
* Lexer Macros
*/
#ifdef _MSC_VER
#define UNUSED __pragma(warning(suppress : 4101))
#else
#define UNUSED __attribute__((unused))
#endif
#define START_LEXER() \
bool result = false; \
bool skip = false; \
UNUSED \
bool eof = false; \
int32_t lookahead; \
goto start; \