diff --git a/include/arc/std/parser.h b/include/arc/std/parser.h index 49915ba..933ee83 100644 --- a/include/arc/std/parser.h +++ b/include/arc/std/parser.h @@ -11,12 +11,12 @@ extern "C" { #include /** - * @brief a parser type + * @brief a type used for splitting a string up into parts and storing them in user defined types */ typedef struct ARC_Parser ARC_Parser; /** - * @brief a langue tag type for the parser //TODO: explain this better + * @brief a type that stores a tag id, and a list of tokens and tags that are the rules for a tag in a language */ typedef struct ARC_ParserTag { uint32_t tagId; @@ -42,17 +42,25 @@ typedef struct ARC_ParserTagToken { /** * @brief a callback function to initialize the lexer the parser uses with rules * - * @param lexer the lexer used by the parser that rules should be added to + * @param[in] lexer the lexer used by the parser that rules should be added to */ typedef void (* ARC_Parser_InitLexerRulesFn)(ARC_Lexer *lexer); /** - * @brief TODO: write this + * @brief a function callback the user provides to get a tag or token ID from a string + * + * @param[in] string the string to get an id from + * + * @return an id from the user, the user also can determine what id should be an error */ typedef uint32_t (* ARC_Parser_GetStringIdFn)(ARC_String *string); /** - * @brief TODO: write this + * @brief a function callback to create and store parsed data passed in + * + * @param[in/out] data the place to store the datatype after it is created + * @param[in] parsedData the parsed data to use in creating the data + * @param[in] userData the data that is passed in during parser create, can be anything this callback */ typedef void (* ARC_ParserData_CreateFn)(void **data, ARC_ParserTagToken *parsedData, void *userData);