q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9bbc224f966a40f221ae87a4ff0c134be289d3ba

commit 9bbc224f966a40f221ae87a4ff0c134be289d3ba
Author: Daniel Kolesa <d.kol...@osg.samsung.com>
Date:   Fri May 22 16:34:48 2015 +0100

    eolian: initial support for importing eo files
---
 src/lib/eolian/eo_parser.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index d7c0fde..d8e37ce 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -1827,6 +1827,7 @@ parse_unit(Eo_Lexer *ls, Eina_Bool eot)
         goto found_class;
       case KW_import:
         {
+           Eina_Bool is_eo = EINA_FALSE;
            Eina_Strbuf *buf = push_strbuf(ls);
            const char *found = NULL;
            char errbuf[PATH_MAX];
@@ -1836,10 +1837,16 @@ parse_unit(Eo_Lexer *ls, Eina_Bool eot)
            eina_strbuf_append(buf, ".eot");
            if (!(found = eina_hash_find(_tfilenames, 
eina_strbuf_string_get(buf))))
              {
-                pop_strbuf(ls);
-                snprintf(errbuf, sizeof(errbuf),
-                         "unknown import '%s'", ls->t.value.s);
-                eo_lexer_syntax_error(ls, errbuf);
+                size_t buflen = eina_strbuf_length_get(buf);
+                eina_strbuf_remove(buf, buflen - 1, buflen);
+                if (!(found = eina_hash_find(_filenames, 
eina_strbuf_string_get(buf))))
+                  {
+                     pop_strbuf(ls);
+                     snprintf(errbuf, sizeof(errbuf),
+                              "unknown import '%s'", ls->t.value.s);
+                     eo_lexer_syntax_error(ls, errbuf);
+                  }
+                else is_eo = EINA_TRUE;
              }
            if (eina_hash_find(_parsingeos, found))
              {
@@ -1849,7 +1856,7 @@ parse_unit(Eo_Lexer *ls, Eina_Bool eot)
                 eo_lexer_syntax_error(ls, errbuf);
              }
            pop_strbuf(ls);
-           if (!eo_parser_database_fill(found, EINA_TRUE))
+           if (!(is_eo ? eolian_eo_file_parse(found) : 
eolian_eot_file_parse(found)))
              {
                 pop_strbuf(ls);
                 snprintf(errbuf, sizeof(errbuf),

-- 


Reply via email to