summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-12-31 03:30:03 -0500
committermidipix <writeonce@midipix.org>2016-01-01 22:50:25 -0500
commit7a622c84067e5298d9f9a3f3d78bc3da04896c96 (patch)
treec4b16edf2f1041fec314889f6378fddc4ea1cceb /include
parent2e2787b729b930585459ca13e6698130b0d08978 (diff)
downloadapimagic-7a622c84067e5298d9f9a3f3d78bc3da04896c96.tar.bz2
apimagic-7a622c84067e5298d9f9a3f3d78bc3da04896c96.tar.xz
ammgc_get_unit_entities(): initial implementation and integration.
Diffstat (limited to 'include')
-rw-r--r--include/apimagic/apimagic.h31
1 files changed, 31 insertions, 0 deletions
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 <stdint.h>
#include <stdio.h>
+#include <cparser/ast/entity.h>
#include <cparser/driver/c_driver.h>
#include <cparser/driver/driver_t.h>
@@ -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
}