forked from enlightenment/efl
eolian: allow composites keyword in place of composite
Fixes T8218.
This commit is contained in:
parent
46a6949b2e
commit
bc793753cb
|
@ -27,7 +27,7 @@ enum Tokens
|
||||||
*/
|
*/
|
||||||
#define KEYWORDS KW(class), KW(const), KW(enum), KW(return), KW(struct), \
|
#define KEYWORDS KW(class), KW(const), KW(enum), KW(return), KW(struct), \
|
||||||
\
|
\
|
||||||
KW(abstract), KW(c_prefix), KW(composite), KW(constructor), KW(constructors), \
|
KW(abstract), KW(c_prefix), KW(composite), KW(composites), KW(constructor), KW(constructors), \
|
||||||
KW(data), KW(destructor), KW(error), KW(event_prefix), KW(events), KW(extends), \
|
KW(data), KW(destructor), KW(error), KW(event_prefix), KW(events), KW(extends), \
|
||||||
KW(free), KW(get), KW(implements), KW(import), KW(interface), \
|
KW(free), KW(get), KW(implements), KW(import), KW(interface), \
|
||||||
KW(keys), KW(legacy), KW(methods), KW(mixin), KW(params), \
|
KW(keys), KW(legacy), KW(methods), KW(mixin), KW(params), \
|
||||||
|
|
|
@ -2210,8 +2210,8 @@ _composite_add(Eo_Lexer *ls, Eina_Strbuf *buf)
|
||||||
eo_lexer_syntax_error(ls, ebuf);
|
eo_lexer_syntax_error(ls, ebuf);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* do not introduce a dependency */
|
/* composite == definitely a dependency */
|
||||||
database_defer(ls->state, fnm, EINA_FALSE);
|
database_defer(ls->state, fnm, EINA_TRUE);
|
||||||
free(fnm);
|
free(fnm);
|
||||||
ls->klass->composite = eina_list_append(ls->klass->composite, nm);
|
ls->klass->composite = eina_list_append(ls->klass->composite, nm);
|
||||||
eo_lexer_context_pop(ls);
|
eo_lexer_context_pop(ls);
|
||||||
|
@ -2306,7 +2306,7 @@ tags_done:
|
||||||
/* regular class can have a parent, but just one */
|
/* regular class can have a parent, but just one */
|
||||||
_inherit_dep(ls, ibuf, EINA_TRUE);
|
_inherit_dep(ls, ibuf, EINA_TRUE);
|
||||||
/* if not followed by implements, we're done */
|
/* if not followed by implements, we're done */
|
||||||
if (ls->t.kw != KW_implements)
|
if ((ls->t.kw != KW_implements) && (ls->t.kw != KW_composites))
|
||||||
{
|
{
|
||||||
eo_lexer_dtor_pop(ls);
|
eo_lexer_dtor_pop(ls);
|
||||||
goto inherit_done;
|
goto inherit_done;
|
||||||
|
@ -2318,10 +2318,10 @@ tags_done:
|
||||||
while (test_next(ls, ','));
|
while (test_next(ls, ','));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ls->t.kw == KW_composite)
|
if (ls->t.kw == KW_composite || ls->t.kw == KW_composites)
|
||||||
{
|
{
|
||||||
if (type == EOLIAN_CLASS_INTERFACE)
|
if (type == EOLIAN_CLASS_INTERFACE)
|
||||||
eo_lexer_syntax_error(ls, "composite not allowed in interfaces");
|
eo_lexer_syntax_error(ls, "interfaces cannot composite");
|
||||||
eo_lexer_get(ls);
|
eo_lexer_get(ls);
|
||||||
do
|
do
|
||||||
_composite_add(ls, ibuf);
|
_composite_add(ls, ibuf);
|
||||||
|
|
Loading…
Reference in New Issue