moved doxygen to doc folder and still working on csv
This commit is contained in:
parent
ca6a9c118f
commit
280a70c6e8
24 changed files with 282 additions and 105 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#include "arc/std/parser/parserlang.h"
|
||||
#include "arc/std/bool.h"
|
||||
#include "arc/std/errno.h"
|
||||
#include "arc/std/lexer.h"
|
||||
#include "arc/std/parser.h"
|
||||
|
|
@ -39,12 +40,12 @@ void ARC_ParserLang_InitLexerRulesFn(ARC_Lexer *lexer){
|
|||
ARC_String_Destroy(arrowString);
|
||||
}
|
||||
|
||||
void ARC_ParserLang_VectorDestroyVector(void *data){
|
||||
void ARC_ParserLang_VectorDestroyVectorFn(void *data){
|
||||
ARC_Vector *vector = (ARC_Vector *)data;
|
||||
ARC_Vector_Destroy(vector);
|
||||
}
|
||||
|
||||
void ARC_ParserLang_VectorDestroyUInt32(void *data){
|
||||
void ARC_ParserLang_VectorDestroyUInt32Fn(void *data){
|
||||
uint32_t *uint = (uint32_t *)data;
|
||||
free(uint);
|
||||
}
|
||||
|
|
@ -161,7 +162,7 @@ void ARC_ParserLangParsedData_GetArgumentsTag(ARC_Vector *tokensOrTags, ARC_Pars
|
|||
uint32_t tokensOrTagsIndex = 0;
|
||||
ARC_Vector *orTokensOrTags = NULL;
|
||||
|
||||
ARC_Vector_DestroyDataFn destroyUint32Fn = ARC_ParserLang_VectorDestroyUInt32;
|
||||
ARC_Vector_DestroyDataFn destroyUint32Fn = ARC_ParserLang_VectorDestroyUInt32Fn;
|
||||
|
||||
switch(childTagToken->id){
|
||||
case ARC_PARSERLANG_ARGUMENT:
|
||||
|
|
@ -213,12 +214,12 @@ void ARC_ParserLangParsedData_CreateBodyTag(ARC_ParserTag **tag, ARC_ParserTagTo
|
|||
/* ~ Tokens Or Tags Array ~ */
|
||||
//create a vector to store another vector of data
|
||||
ARC_Vector *tokensOrTags;
|
||||
ARC_Vector_DestroyDataFn destroyVectorFn = ARC_ParserLang_VectorDestroyVector;
|
||||
ARC_Vector_DestroyDataFn destroyVectorFn = ARC_ParserLang_VectorDestroyVectorFn;
|
||||
ARC_Vector_Create(&tokensOrTags, NULL, &destroyVectorFn);
|
||||
|
||||
//create vector within the tokens or tags vector to store the or rule in
|
||||
ARC_Vector *orTokensOrTags;
|
||||
ARC_Vector_DestroyDataFn destroyUint32Fn = ARC_ParserLang_VectorDestroyUInt32;
|
||||
ARC_Vector_DestroyDataFn destroyUint32Fn = ARC_ParserLang_VectorDestroyUInt32Fn;
|
||||
ARC_Vector_Create(&orTokensOrTags, NULL, &destroyUint32Fn);
|
||||
|
||||
//add the first or vector to the tokensOrTags
|
||||
|
|
@ -308,14 +309,14 @@ void ARC_ParserLang_CreateDataFn(void **data, ARC_ParserTagToken *parsedData, vo
|
|||
}
|
||||
|
||||
//private function to destroy the saved data for the language
|
||||
void ARC_ParserLang_DestroyDataFn(void *data, void *userData){
|
||||
void ARC_ParserLang_DestroyDataFn(void *data, ARC_Bool clear, void *userData){
|
||||
if(userData != NULL){
|
||||
ARC_Parser_GetStringIdFn *getStringIdFn = (ARC_Parser_GetStringIdFn *)userData;
|
||||
free(getStringIdFn);
|
||||
}
|
||||
|
||||
//check if there is data to free
|
||||
if((ARC_Vector *)data != NULL){
|
||||
//if not clearing (full destroy) check if there is data to free
|
||||
if(clear == ARC_False && (ARC_Vector *)data != NULL){
|
||||
ARC_Vector_Destroy((ARC_Vector *)data);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue