forked from enlightenment/efl
eolian: enforce no get/set as method/property name rule
Fixes T3849.
This commit is contained in:
parent
df74455ec9
commit
1c78d2196b
|
@ -216,7 +216,7 @@ _efl_vpath_core_efl_object_destructor(Eo *obj, Efl_Vpath_Core_Data *pd)
|
|||
}
|
||||
|
||||
EOLIAN static Efl_Vpath_Core *
|
||||
_efl_vpath_core_get(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED)
|
||||
_efl_vpath_core_core_get(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED)
|
||||
{
|
||||
// no locks here as we expect efl to init this early in main "thread"
|
||||
if (!vpath_core) vpath_core = efl_add(EFL_VPATH_CORE_CLASS, NULL);
|
||||
|
|
|
@ -6,7 +6,7 @@ class Efl.Vpath.Core (Efl.Object, Efl.Vpath)
|
|||
]]
|
||||
eo_prefix: efl_vpath_core;
|
||||
methods {
|
||||
get @class {
|
||||
core_get @class {
|
||||
[[ This gets the global EFL Core Vpath class - only 1 - singleton ]]
|
||||
return: Efl.Vpath.Core; [[ Get the singleton core vpath ]]
|
||||
}
|
||||
|
|
|
@ -1351,6 +1351,11 @@ parse_property(Eo_Lexer *ls)
|
|||
FILL_BASE(prop->base, ls, ls->line_number, ls->column);
|
||||
ls->tmp.kls->properties = eina_list_append(ls->tmp.kls->properties, prop);
|
||||
check(ls, TOK_VALUE);
|
||||
if (ls->t.kw == KW_get || ls->t.kw == KW_set)
|
||||
{
|
||||
eo_lexer_syntax_error(ls, "reserved keyword as property name");
|
||||
return;
|
||||
}
|
||||
prop->name = eina_stringshare_ref(ls->t.value.s);
|
||||
eo_lexer_get(ls);
|
||||
for (;;) switch (ls->t.kw)
|
||||
|
@ -1431,6 +1436,11 @@ parse_method(Eo_Lexer *ls)
|
|||
FILL_BASE(meth->base, ls, ls->line_number, ls->column);
|
||||
ls->tmp.kls->methods = eina_list_append(ls->tmp.kls->methods, meth);
|
||||
check(ls, TOK_VALUE);
|
||||
if (ls->t.kw == KW_get || ls->t.kw == KW_set)
|
||||
{
|
||||
eo_lexer_syntax_error(ls, "reserved keyword as method name");
|
||||
return;
|
||||
}
|
||||
meth->name = eina_stringshare_ref(ls->t.value.s);
|
||||
eo_lexer_get(ls);
|
||||
for (;;) switch (ls->t.kw)
|
||||
|
|
Loading…
Reference in New Issue