diff --git a/src/std/parser.c b/src/std/parser.c index d34583b..93ff500 100644 --- a/src/std/parser.c +++ b/src/std/parser.c @@ -1,6 +1,7 @@ #include "arc/std/parser.h" #include "arc/std/errno.h" #include "arc/std/lexer.h" +#include "arc/std/vector.h" #include #include #include @@ -45,7 +46,7 @@ void ARC_Parser_Destroy(ARC_Parser *parser){ } //private recusive function to parse a tag -void ARC_Parser_ParseTag(ARC_Parser *parser, ARC_String *subdata, uint32_t tagId){ +void ARC_Parser_ParseTag(ARC_Parser *parser, uint32_t lexerIndex, uint32_t tagId){ //get the current tag ARC_ParserLanguageTag *tag = NULL; for(uint32_t index = 0; index < parser->language.size; index++){ @@ -62,6 +63,16 @@ void ARC_Parser_ParseTag(ARC_Parser *parser, ARC_String *subdata, uint32_t tagId ARC_DEBUG_LOG_ERROR_WITH_VARIABLES("ARC_Parser_ParseTag(parser, subdata, tagId), could not find tag with id: %u", tagId); return; } + + //loop through each or section of the tags and tokens + for(uint32_t orIndex = 0; orIndex < tag->tokensOrTagsSize; orIndex++){ + //loop through each token or tag to check if the lexed data matches + uint32_t lexerCheckIndex = lexerIndex; + for(uint32_t tokenOrTagIndex = 1; tokenOrTagIndex < tag->tokensOrTags[orIndex][0] + 1; tokenOrTagIndex++){ + + } + // + } } void ARC_Parser_Parse(ARC_Parser *parser, ARC_String *data){