if (eot) goto done;
- if (!eina_list_count(ls->tmp.classes))
+ if (!(cl = ls->tmp.kls))
{
- fprintf(stderr, "eolian: no classes for file '%s'\n", filename);
+ fprintf(stderr, "eolian: no class for file '%s'\n", filename);
goto error;
}
+ ls->tmp.kls = NULL;
- while (ls->tmp.classes)
- {
- cl = eina_list_data_get(ls->tmp.classes);
- if (!_db_fill_class(cl))
- goto error;
- ls->tmp.classes = eina_list_remove_list(ls->tmp.classes,
- ls->tmp.classes);
- }
+ if (!_db_fill_class(cl))
+ goto error;
done:
if (eot)
{
Eina_Strbuf *buf;
Eolian_Type *tp;
- Eolian_Class *cl;
const char *s;
if (tmp->kls)
EINA_LIST_FREE(tmp->strs, s)
if (s) eina_stringshare_del(s);
-
- EINA_LIST_FREE(tmp->classes, cl)
- database_class_del(cl);
}
void
{
Eolian_Class *kls;
Eolian_Variable *var;
- Eina_List *classes;
Eina_List *str_bufs;
Eina_List *type_defs;
Eina_List *expr_defs;
return EINA_FALSE;
found_class:
database_decl_add(ls->tmp.kls->full_name, EOLIAN_DECL_CLASS, ls->tmp.kls);
- ls->tmp.classes = eina_list_append(ls->tmp.classes, ls->tmp.kls);
- ls->tmp.kls = NULL;
return EINA_TRUE;
}
Eolian_Constructor *ctor;
if (!class)
{
- const char *full_filepath = eina_hash_find(_filenames, bfilename);
- if (!full_filepath) full_filepath = filepath;
- if (!eo_parser_database_fill(full_filepath, EINA_FALSE))
+ if (!eo_parser_database_fill(filepath, EINA_FALSE))
{
free(bfiledup);
goto error;
}
class = eolian_class_get_by_file(bfilename);
- if (!class)
- {
- fprintf(stderr, "eolian: no class for file '%s'\n", bfilename);
- free(bfiledup);
- goto error;
- }
+ }
+ else
+ {
+ free(bfiledup);
+ return EINA_TRUE;
}
free(bfiledup);
itr = eolian_class_implements_get(class);