Added a nice error message

This commit is contained in:
2024-11-02 14:39:59 +11:00
parent ef72415c21
commit 92955d56dd
2 changed files with 13 additions and 6 deletions

View File

@@ -21,8 +21,8 @@ typedef struct {
TOY_API void Toy_bindLexer(Toy_Lexer* lexer, const char* source);
TOY_API Toy_Token Toy_private_scanLexer(Toy_Lexer* lexer);
TOY_API void Toy_private_printToken(Toy_Token* token); //debugging
//util
#define TOY_BLANK_TOKEN() ((Toy_Token){TOY_TOKEN_NULL, 0, 0, NULL})
TOY_API const char* Toy_private_findKeywordByType(const Toy_TokenType type);
TOY_API Toy_TokenType Toy_private_findTypeByKeyword(const char* keyword);
TOY_API void Toy_private_printToken(Toy_Token* token);