summaryrefslogtreecommitdiff
path: root/src/lib/eolian
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-12-04 16:04:19 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2019-12-04 16:07:09 +0100
commitc601944a13d63d2b4228aeca1cd680c5d092e58b (patch)
tree7646fbc76b98dd41f4c8349bbb167711b3a9e32f /src/lib/eolian
parente242a05d73c0fd7142c0d8c7804d5f60ffb80748 (diff)
eolian: fix a parse bug where composites was treated as implements
In the specific case where you had "class A extends B composites C" the correct composites branch was ignored and instead the implements branch was used. This was entirely wrong/an oversight that did not appear until now. Other combinations were handled correctly.
Diffstat (limited to 'src/lib/eolian')
-rw-r--r--src/lib/eolian/eo_parser.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 8316c4f3bc..96de7a77ec 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -2301,8 +2301,11 @@ tags_done:
2301 { 2301 {
2302 /* regular class can have a parent, but just one */ 2302 /* regular class can have a parent, but just one */
2303 _inherit_dep(ls, ibuf, EINA_TRUE); 2303 _inherit_dep(ls, ibuf, EINA_TRUE);
2304 /* followed by composites */
2305 if (ls->t.kw == KW_composites)
2306 goto noimp_comp;
2304 /* if not followed by implements, we're done */ 2307 /* if not followed by implements, we're done */
2305 if ((ls->t.kw != KW_implements) && (ls->t.kw != KW_composites)) 2308 if (ls->t.kw != KW_implements)
2306 { 2309 {
2307 eo_lexer_dtor_pop(ls); 2310 eo_lexer_dtor_pop(ls);
2308 goto inherit_done; 2311 goto inherit_done;
@@ -2314,6 +2317,7 @@ tags_done:
2314 while (test_next(ls, ',')); 2317 while (test_next(ls, ','));
2315 } 2318 }
2316 2319
2320noimp_comp:
2317 if (ls->t.kw == KW_composites) 2321 if (ls->t.kw == KW_composites)
2318 { 2322 {
2319 if (type == EOLIAN_CLASS_INTERFACE) 2323 if (type == EOLIAN_CLASS_INTERFACE)