#include <ctype.h>
+#include <assert.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
Eolian_Function *func;
Eolian_Event *event;
Eolian_Implement *impl;
+ const char *iname;
+
+ if (!cl)
+ return EINA_FALSE; /* if this happens something is very wrong though */
if (cl->base.validated)
return EINA_TRUE;
+ EINA_LIST_FOREACH(cl->inherits, l, iname)
+ {
+ if (!_validate_class(eina_hash_find(_classes, iname)))
+ return EINA_FALSE;
+ }
+
EINA_LIST_FOREACH(cl->properties, l, func)
if (!_validate_function(func))
return EINA_FALSE;
/* FIXME: pass unit properly */
Eina_Iterator *iter = eolian_all_classes_get(NULL);
EINA_ITERATOR_FOREACH(iter, cl)
- if (!_validate_class(cl))
+ if (cl->toplevel && !_validate_class(cl))
{
eina_iterator_free(iter);
return EINA_FALSE;
}
_parse_dep(ls, fname, iname);
/* FIXME: pass unit properly */
- const Eolian_Class *dep = eolian_class_get_by_name(NULL, iname);
+ Eolian_Class *dep = (Eolian_Class *)eolian_class_get_by_name(NULL, iname);
if (!dep)
{
char ebuf[PATH_MAX];
}
ls->tmp.kls->inherits = eina_list_append(ls->tmp.kls->inherits,
eina_stringshare_add(iname));
+ dep->toplevel = EINA_FALSE;
eo_lexer_context_pop(ls);
}
int line, col;
Eina_Strbuf *buf = push_strbuf(ls);
ls->tmp.kls = calloc(1, sizeof(Eolian_Class));
+ ls->tmp.kls->toplevel = EINA_TRUE;
FILL_BASE(ls->tmp.kls->base, ls, ls->line_number, ls->column);
eo_lexer_get(ls);
ls->tmp.kls->type = type;