summaryrefslogtreecommitdiff
path: root/src/lib/eolian/eo_parser.c
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-08-29 11:40:29 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-08-29 11:40:29 +0100
commit3e5da03f7dd3b99e1c92ae4c73285cebebb37e18 (patch)
tree6ee79553dfb9adf65982e169ecdf2d14d827d254 /src/lib/eolian/eo_parser.c
parent19a6c265b6d598759a2b74340464b6f6beed838a (diff)
eolian: update virtual to the new syntax (as per wiki)
Diffstat (limited to 'src/lib/eolian/eo_parser.c')
-rw-r--r--src/lib/eolian/eo_parser.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 76f0cf5497..6b03a085b9 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -1481,7 +1481,6 @@ parse_implement(Eo_Lexer *ls, Eina_Bool iface)
1481{ 1481{
1482 Eina_Strbuf *buf = NULL; 1482 Eina_Strbuf *buf = NULL;
1483 Eolian_Implement *impl = NULL; 1483 Eolian_Implement *impl = NULL;
1484 buf = push_strbuf(ls);
1485 impl = calloc(1, sizeof(Eolian_Implement)); 1484 impl = calloc(1, sizeof(Eolian_Implement));
1486 impl->base.file = eina_stringshare_ref(ls->filename); 1485 impl->base.file = eina_stringshare_ref(ls->filename);
1487 impl->base.line = ls->line_number; 1486 impl->base.line = ls->line_number;
@@ -1491,54 +1490,50 @@ parse_implement(Eo_Lexer *ls, Eina_Bool iface)
1491 check_kw(ls, KW_class); 1490 check_kw(ls, KW_class);
1492 if (ls->t.kw == KW_class) 1491 if (ls->t.kw == KW_class)
1493 { 1492 {
1494 eina_strbuf_append(buf, "class.");
1495 eo_lexer_get(ls); 1493 eo_lexer_get(ls);
1496 check_next(ls, '.'); 1494 check_next(ls, '.');
1497 if (ls->t.kw == KW_destructor) 1495 if (ls->t.kw == KW_destructor)
1498 { 1496 {
1499 eina_strbuf_append(buf, "destructor"); 1497 impl->is_class_dtor = EINA_TRUE;
1500 eo_lexer_get(ls); 1498 eo_lexer_get(ls);
1501 } 1499 }
1502 else 1500 else
1503 { 1501 {
1504 check_kw_next(ls, KW_constructor); 1502 check_kw_next(ls, KW_constructor);
1505 eina_strbuf_append(buf, "constructor"); 1503 impl->is_class_ctor = EINA_TRUE;
1506 } 1504 }
1507 check_next(ls, ';'); 1505 check_next(ls, ';');
1508 impl->full_name = eina_stringshare_add(eina_strbuf_string_get(buf));
1509 pop_strbuf(ls);
1510 return; 1506 return;
1511 } 1507 }
1512 else if (ls->t.kw == KW_virtual) 1508 else if (ls->t.kw == KW_at_virtual)
1513 { 1509 {
1514 eina_strbuf_append(buf, "virtual."); 1510 impl->is_virtual = EINA_TRUE;
1515 eo_lexer_get(ls); 1511 eo_lexer_get(ls);
1516 check_next(ls, '.'); 1512 check_next(ls, '.');
1517 if ((ls->t.token != TOK_VALUE) || (ls->t.kw == KW_get || ls->t.kw == KW_set)) 1513 if ((ls->t.token != TOK_VALUE) || (ls->t.kw == KW_get || ls->t.kw == KW_set))
1518 eo_lexer_syntax_error(ls, "name expected"); 1514 eo_lexer_syntax_error(ls, "name expected");
1519 eina_strbuf_append(buf, ls->t.value.s); 1515 impl->full_name = eina_stringshare_add(ls->t.value.s);
1520 eo_lexer_get(ls); 1516 eo_lexer_get(ls);
1521 if (ls->t.token == '.') 1517 if (ls->t.token == '.')
1522 { 1518 {
1523 eo_lexer_get(ls); 1519 eo_lexer_get(ls);
1524 if (ls->t.kw == KW_set) 1520 if (ls->t.kw == KW_set)
1525 { 1521 {
1526 eina_strbuf_append(buf, ".set"); 1522 impl->is_prop_set = EINA_TRUE;
1527 eo_lexer_get(ls); 1523 eo_lexer_get(ls);
1528 } 1524 }
1529 else 1525 else
1530 { 1526 {
1531 check_kw_next(ls, KW_get); 1527 check_kw_next(ls, KW_get);
1532 eina_strbuf_append(buf, ".get"); 1528 impl->is_prop_get = EINA_TRUE;
1533 } 1529 }
1534 } 1530 }
1535 check_next(ls, ';'); 1531 check_next(ls, ';');
1536 impl->full_name = eina_stringshare_add(eina_strbuf_string_get(buf));
1537 pop_strbuf(ls);
1538 return; 1532 return;
1539 } 1533 }
1540 if ((ls->t.token != TOK_VALUE) || (ls->t.kw == KW_get || ls->t.kw == KW_set)) 1534 if ((ls->t.token != TOK_VALUE) || (ls->t.kw == KW_get || ls->t.kw == KW_set))
1541 eo_lexer_syntax_error(ls, "class name expected"); 1535 eo_lexer_syntax_error(ls, "class name expected");
1536 buf = push_strbuf(ls);
1542 eina_strbuf_append(buf, ls->t.value.s); 1537 eina_strbuf_append(buf, ls->t.value.s);
1543 eo_lexer_get(ls); 1538 eo_lexer_get(ls);
1544 check_next(ls, '.'); 1539 check_next(ls, '.');