From 7a622c84067e5298d9f9a3f3d78bc3da04896c96 Mon Sep 17 00:00:00 2001 From: midipix Date: Thu, 31 Dec 2015 03:30:03 -0500 Subject: ammgc_get_unit_entities(): initial implementation and integration. --- include/apimagic/apimagic.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'include') diff --git a/include/apimagic/apimagic.h b/include/apimagic/apimagic.h index 500463c..f6c1767 100644 --- a/include/apimagic/apimagic.h +++ b/include/apimagic/apimagic.h @@ -4,6 +4,7 @@ #include #include +#include #include #include @@ -76,11 +77,39 @@ struct amgc_unit_meta { int ngenerated; }; +struct amgc_define { + const pp_definition_t * symbol; + const char * definition; + const char * altname; +}; + +struct amgc_entity { + const union entity_t * entity; + const char * altname; + int enumval; + bool fmbstr; + bool futf16; + bool fset; + bool fexclude; +}; + +struct amgc_unit_entities { + struct amgc_define * defines; + struct amgc_entity * enums; + struct amgc_entity * enumvals; + struct amgc_entity * typedefs; + struct amgc_entity * structs; + struct amgc_entity * unions; + struct amgc_entity * functions; + struct amgc_entity * generated; +}; + struct amgc_unit_ctx { const char * const * path; const struct amgc_input * map; const struct amgc_common_ctx * cctx; const struct amgc_unit_meta * meta; + const struct amgc_unit_entities*entities; const struct compilation_unit_t*ccunit; void * any; int status; @@ -105,6 +134,8 @@ amgc_api int amgc_lang_std_from_string (const char * std); /* low-level api */ amgc_api int amgc_init_unit_meta (const struct amgc_unit_ctx *, struct amgc_unit_meta *); +amgc_api int amgc_get_unit_entities (const struct amgc_unit_ctx *, struct amgc_unit_meta *, struct amgc_unit_entities **); +amgc_api void amgc_free_unit_entities (struct amgc_unit_entities *); #ifdef __cplusplus } -- cgit v1.2.3