else
{
def->type = EOLIAN_TYPE_REGULAR;
- def->is_struct = has_struct;
- def->is_const = EINA_FALSE;
+ def->is_const = EINA_FALSE;
check(ls, TOK_VALUE);
ctype = eo_lexer_get_c_type(ls->t.kw);
- def->name = eina_stringshare_add(ctype ? ctype : ls->t.value);
+ if (ctype && has_struct)
+ eo_lexer_syntax_error(ls, "struct type expected");
+ if (has_struct)
+ {
+ Eina_Strbuf *buf = eina_strbuf_new();
+ eina_strbuf_append(buf, "struct ");
+ eina_strbuf_append(buf, ls->t.value);
+ def->name = eina_stringshare_add(eina_strbuf_string_get(buf));
+ eina_strbuf_free(buf);
+ }
+ else
+ def->name = eina_stringshare_add(ctype ? ctype : ls->t.value);
}
eo_lexer_get(ls);
parse_ptr:
fputs("@own(", f);
if (tp->is_const)
fputs("const(", f);
- if (tp->is_struct)
- fputs("struct ", f);
if (tp->type == EOLIAN_TYPE_REGULAR)
fputs(tp->name, f);
else if (tp->type == EOLIAN_TYPE_POINTER)
};
Eina_Bool is_const :1;
Eina_Bool is_own :1;
- Eina_Bool is_struct :1;
} _Parameter_Type;
typedef struct
if ((tpp->type == EOLIAN_TYPE_REGULAR || tpp->type == EOLIAN_TYPE_VOID)
&& tpp->is_const)
eina_strbuf_append(buf, "const ");
- if (tpp->is_struct)
- eina_strbuf_append(buf, "struct ");
if (tpp->type == EOLIAN_TYPE_REGULAR)
eina_strbuf_append(buf, tpp->name);
else if (tpp->type == EOLIAN_TYPE_VOID)
eina_strbuf_append(buf, "@own(");
if (tpp->is_const)
eina_strbuf_append(buf, "const(");
- if (tpp->is_struct)
- eina_strbuf_append(buf, "struct ");
if (tpp->type == EOLIAN_TYPE_REGULAR)
eina_strbuf_append(buf, tpp->name);
else if (tpp->type == EOLIAN_TYPE_POINTER)