@@ -48,4 +48,12 @@ const char* GetLexemeMapping(TokenType type) {
}
return NULL;
void FreeToken(Token* token) {
if (!token) return;
if (token->type == String || token->type == Number || token->type == Identifier) free((void *) token->lexeme);
free(token);
The note is not visible to the blocked user.