segfault when testing parser

This commit is contained in:
herbglitch 2024-10-28 21:00:48 -06:00
parent d8d1a1a107
commit 050f7a8452
2 changed files with 84 additions and 0 deletions

View file

@ -92,6 +92,7 @@ void ARC_Parser_ParseTag(ARC_Parser *parser, uint32_t *lexerIndex, uint32_t tagI
//if the rule is found we don't need to check anymore so we can return out
if(foundRule == ARC_True){
*lexerIndex = lexerCheckIndex;
//TODO: set tag into datastructure
return;
}
}
@ -106,6 +107,7 @@ void ARC_Parser_Parse(ARC_Parser *parser, ARC_String **data){
ARC_Lexer_LexString(parser->lexer, data);
if(arc_errno){
ARC_DEBUG_LOG_ERROR("ARC_Parser_Parse(parser, data), could not lex the given data");
return;
}
uint32_t lexerIndex = 0;
@ -115,6 +117,7 @@ void ARC_Parser_Parse(ARC_Parser *parser, ARC_String **data){
ARC_Parser_ParseTag(parser, &lexerIndex, startTag.tagId);
if(arc_errno){
ARC_DEBUG_LOG_ERROR("ARC_Parser_Parse(parser, data), could not parse the given data");
return;
}
}