commit 65968200867ab19c993bfaf6ff6444160d7dcb55
parent 3dac143e8ea88ec7b3a48c38f0fe21fd917b1654
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Tue, 22 Nov 2016 16:16:11 +0100
Implement the solstice_parser_get_anchor function
Diffstat:
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/src/parser/solstice_parser.c b/src/parser/solstice_parser.c
@@ -3027,6 +3027,15 @@ error:
goto exit;
}
+const struct solstice_anchor*
+solstice_parser_get_anchor
+ (const struct solstice_parser* parser,
+ const struct solstice_anchor_id anchor)
+{
+ ASSERT(parser && anchor.i < darray_anchor_size_get(&parser->anchors));
+ return darray_anchor_cdata_get(&parser->anchors) + anchor.i;
+}
+
const struct solstice_entity*
solstice_parser_get_entity
(const struct solstice_parser* parser,
diff --git a/src/parser/solstice_parser.h b/src/parser/solstice_parser.h
@@ -71,6 +71,11 @@ solstice_parser_find_entity
(struct solstice_parser* parser,
const char* entity_name);
+extern LOCAL_SYM const struct solstice_anchor*
+solstice_parser_get_anchor
+ (const struct solstice_parser* parser,
+ const struct solstice_anchor_id anchor);
+
extern LOCAL_SYM const struct solstice_entity*
solstice_parser_get_entity
(const struct solstice_parser* parser,