parser mostly fixed, still needs a lot more testing though, and need to store parsed values in a datatype
This commit is contained in:
parent
963b99c6bd
commit
006b4c63f7
5 changed files with 49 additions and 13 deletions
|
|
@ -257,6 +257,13 @@ void ARC_Lexer_LexFile(ARC_Lexer *lexer, ARC_String *path){
|
|||
}
|
||||
}
|
||||
|
||||
void ARC_Lexer_PrintTokenRules(ARC_Lexer *lexer){
|
||||
for(uint32_t index = 0; index < ARC_Vector_GetSize(lexer->tokenRules); index++){
|
||||
ARC_LexerTokenRule *tokenRule = ARC_Vector_Get(lexer->tokenRules, index);
|
||||
printf("Rule: %02i\tFunction: %p\n", tokenRule->id, tokenRule->automataFn);
|
||||
}
|
||||
}
|
||||
|
||||
ARC_LexerToken ARC_Lexer_GetToken(ARC_Lexer *lexer, uint32_t index){
|
||||
//get the token and log if there is an error
|
||||
ARC_LexerToken *token = ARC_Vector_Get(lexer->tokens, index);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue