diff options
author | Daniel Kolesa <d.kolesa@osg.samsung.com> | 2018-04-20 14:45:07 +0200 |
---|---|---|
committer | Daniel Kolesa <d.kolesa@osg.samsung.com> | 2018-04-20 16:10:55 +0200 |
commit | 591567a6ac17d5f849cc2463128796efa6e4aebe (patch) | |
tree | b139c22b7186cccce5776875c164183e156a3236 | |
parent | b9d3347a482a5c07a66a2aed7627d4e21b0e7e5e (diff) | |
download | efl-591567a6ac17d5f849cc2463128796efa6e4aebe.tar.gz |
eolian: add 'parse' directive
This is much like 'import' but doesn't add the imported file into
the dependency list for the current file. This is to enable doc
reference validation to remain functional without needlessly
introducing file dependencies just to satisfy it.
-rw-r--r-- | src/lib/eolian/eo_lexer.h | 4 | ||||
-rw-r--r-- | src/lib/eolian/eo_parser.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h index 81c95ea4a6..fe41d1de09 100644 --- a/src/lib/eolian/eo_lexer.h +++ b/src/lib/eolian/eo_lexer.h @@ -27,8 +27,8 @@ enum Tokens KW(abstract), KW(constructor), KW(constructors), KW(data), \ KW(destructor), KW(eo), KW(eo_prefix), KW(event_prefix), KW(events), KW(free), \ KW(get), KW(implements), KW(import), KW(interface), KW(keys), KW(legacy), \ - KW(legacy_prefix), KW(methods), KW(mixin), KW(params), KW(parts), KW(ptr), \ - KW(set), KW(type), KW(values), KW(var), KWAT(auto), KWAT(beta), \ + KW(legacy_prefix), KW(methods), KW(mixin), KW(params), KW(parse), KW(parts), \ + KW(ptr), KW(set), KW(type), KW(values), KW(var), KWAT(auto), KWAT(beta), \ KWAT(class), KWAT(const), KWAT(cref), KWAT(empty), KWAT(extern), \ KWAT(free), KWAT(hot), KWAT(in), KWAT(inout), KWAT(nonull), KWAT(nullable), \ KWAT(optional), KWAT(out), KWAT(owned), KWAT(private), KWAT(property), \ diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c index 780f1840c0..0360d0fd04 100644 --- a/src/lib/eolian/eo_parser.c +++ b/src/lib/eolian/eo_parser.c @@ -2073,7 +2073,9 @@ parse_unit(Eo_Lexer *ls, Eina_Bool eot) parse_class(ls, EOLIAN_CLASS_INTERFACE); goto found_class; case KW_import: + case KW_parse: { + Eina_Bool isdep = (ls->t.kw == KW_import); Eina_Strbuf *buf = eina_strbuf_new(); eo_lexer_dtor_push(ls, EINA_FREE_CB(eina_strbuf_free), buf); char errbuf[PATH_MAX]; @@ -2093,7 +2095,7 @@ parse_unit(Eo_Lexer *ls, Eina_Bool eot) eo_lexer_syntax_error(ls, errbuf); } } - database_defer(ls->state, eina_strbuf_string_get(buf), EINA_TRUE); + database_defer(ls->state, eina_strbuf_string_get(buf), isdep); eo_lexer_dtor_pop(ls); eo_lexer_get(ls); check_next(ls, ';'); |