parser clears lexer when done parsing

This commit is contained in:
herbglitch 2024-10-30 18:41:01 -06:00
parent b10f9b9123
commit 58986021de
4 changed files with 34 additions and 1 deletions

View file

@ -74,6 +74,13 @@ void ARC_Lexer_Destroy(ARC_Lexer *lexer);
*/
void ARC_Lexer_RegisterTokenRule(ARC_Lexer *lexer, ARC_LexerTokenRule tokenRule);
/**
* @brief clears all tokens from a lexer (will not clear token rules)
*
* @param lexer the lexer to clear tokens from
*/
void ARC_Lexer_Clear(ARC_Lexer *lexer);
/**
* @brief creates tokens using a given string with ARC_LexerToken rules
*