parser clears lexer when done parsing
This commit is contained in:
parent
b10f9b9123
commit
58986021de
4 changed files with 34 additions and 1 deletions
|
|
@ -151,6 +151,11 @@ void ARC_Lexer_RegisterTokenRule(ARC_Lexer *lexer, ARC_LexerTokenRule tokenRule)
|
|||
}
|
||||
}
|
||||
|
||||
void ARC_Lexer_Clear(ARC_Lexer *lexer){
|
||||
//clear the tokens vector
|
||||
ARC_Vector_Clear(lexer->tokens);
|
||||
}
|
||||
|
||||
void ARC_Lexer_LexString(ARC_Lexer *lexer, ARC_String **data){
|
||||
//check if there are any token rules to use
|
||||
if(ARC_Vector_GetSize(lexer->tokenRules) == 0){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue