|
json-gen-c
0.1.5
json-gen-c generate C code for json manipulation
|
parse struct definition file. More...
#include "struct/struct_parse.h"#include <ctype.h>#include <malloc.h>#include <stdio.h>#include <string.h>#include "utils/hash_map.h"#include "utils/io.h"#include "utils/sstr.h"#include "utils/error_codes.h"
Macros | |
| #define | PERROR(parser, fmt, ...) |
Functions | |
| struct struct_parser * | struct_parser_new () |
| create and init a struct_parser instance. | |
| void | struct_parser_free (struct struct_parser *parser) |
| free a struct_parser instance. | |
| int | struct_parser_parse (struct struct_parser *parser, sstr_t content) |
| parse a struct definition file, and store the parsed structs in struct_parser. | |
parse struct definition file.
| #define PERROR | ( | parser, | |
| fmt, | |||
| ... | |||
| ) |
| void struct_parser_free | ( | struct struct_parser * | parser | ) |
free a struct_parser instance.
| parser | struct struct_parser* |
| struct struct_parser * struct_parser_new | ( | ) |
create and init a struct_parser instance.
| int struct_parser_parse | ( | struct struct_parser * | parser, |
| sstr_t | content | ||
| ) |
parse a struct definition file, and store the parsed structs in struct_parser.
| parser | context of parser. |
| content | content of the file. |