From 06cb82a8ccc3587dff728321dff5416b18090483 Mon Sep 17 00:00:00 2001 From: katherine Date: Wed, 10 Jul 2019 20:24:08 -0700 Subject: implement deftype get --- src/parse.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/parse.h') diff --git a/src/parse.h b/src/parse.h index 4f2645d..1ab2a19 100644 --- a/src/parse.h +++ b/src/parse.h @@ -7,7 +7,7 @@ #include -#define PARSE_DEFTYPE_MAX_LEN 32 +#define PARSE_DEFTYPE_MAX_LEN 128 /* very important these stay in order. * things like ">= PARSE_TYPE_ARRAY_BOOL" used */ @@ -69,6 +69,7 @@ struct parse_deftype_s { bool is_used; bool is_in_array; bool is_in_hash; + bool contains_heap; unsigned member_list_len; enum parse_type_e member_type_list[PARSE_DEFTYPE_MAX_LEN]; char member_name_list[PARSE_DEFTYPE_MAX_LEN][TOK_MAX_LEN]; @@ -94,8 +95,12 @@ struct parse_result_s { struct parse_var_s *vars; }; -struct parse_result_s parse(FILE *f, const char *fname); +extern const char *parse_typestrs[]; -void parse_result_wipe(struct parse_result_s *r); +int parse_typestr_to_type(const char *s); + +struct parse_result_s* parse(FILE *f, const char *fname); + +void parse_result_free(struct parse_result_s *pr); #endif -- cgit v1.2.3