summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-11-21 13:59:42 +0000
committerDaniel Kolesa <d.kolesa@samsung.com>2014-11-21 13:59:42 +0000
commit423629f81739813f9eaa1ea190c635e9486249d7 (patch)
tree044f379a0c8d8d2ec1b10789397ddb1190389338
parent72caa0013cb8419fe903d8cf885656b1dbe4828e (diff)
eolian: get rid of the PARSE_SECTION macro nonsense
-rw-r--r--src/lib/eolian/eo_parser.c43
1 files changed, 30 insertions, 13 deletions
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 8fd51f5a2a..c45e79dcba 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -9,14 +9,6 @@
9 eo_lexer_syntax_error(ls, "double " msg); \ 9 eo_lexer_syntax_error(ls, "double " msg); \
10 has_##var = EINA_TRUE; 10 has_##var = EINA_TRUE;
11 11
12#define PARSE_SECTION \
13 int line, col; \
14 eo_lexer_get(ls); \
15 line = ls->line_number; \
16 col = ls->column; \
17 check_next(ls, '{'); \
18 while (ls->t.token != '}')
19
20static void 12static void
21error_expected(Eo_Lexer *ls, int token) 13error_expected(Eo_Lexer *ls, int token)
22{ 14{
@@ -1302,7 +1294,12 @@ static void
1302parse_params(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout, 1294parse_params(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout,
1303 Eina_Bool is_vals) 1295 Eina_Bool is_vals)
1304{ 1296{
1305 PARSE_SECTION parse_param(ls, params, allow_inout, is_vals); 1297 int line, col;
1298 eo_lexer_get(ls);
1299 line = ls->line_number, col = ls->column;
1300 check_next(ls, '{');
1301 while (ls->t.token != '}')
1302 parse_param(ls, params, allow_inout, is_vals);
1306 check_match(ls, '}', '{', line, col); 1303 check_match(ls, '}', '{', line, col);
1307} 1304}
1308 1305
@@ -1717,28 +1714,48 @@ parse_event(Eo_Lexer *ls)
1717static void 1714static void
1718parse_methods(Eo_Lexer *ls) 1715parse_methods(Eo_Lexer *ls)
1719{ 1716{
1720 PARSE_SECTION parse_method(ls, EINA_FALSE); 1717 int line, col;
1718 eo_lexer_get(ls);
1719 line = ls->line_number, col = ls->column;
1720 check_next(ls, '{');
1721 while (ls->t.token != '}')
1722 parse_method(ls, EINA_FALSE);
1721 check_match(ls, '}', '{', line, col); 1723 check_match(ls, '}', '{', line, col);
1722} 1724}
1723 1725
1724static void 1726static void
1725parse_properties(Eo_Lexer *ls) 1727parse_properties(Eo_Lexer *ls)
1726{ 1728{
1727 PARSE_SECTION parse_property(ls); 1729 int line, col;
1730 eo_lexer_get(ls);
1731 line = ls->line_number, col = ls->column;
1732 check_next(ls, '{');
1733 while (ls->t.token != '}')
1734 parse_property(ls);
1728 check_match(ls, '}', '{', line, col); 1735 check_match(ls, '}', '{', line, col);
1729} 1736}
1730 1737
1731static void 1738static void
1732parse_implements(Eo_Lexer *ls, Eina_Bool iface) 1739parse_implements(Eo_Lexer *ls, Eina_Bool iface)
1733{ 1740{
1734 PARSE_SECTION parse_implement(ls, iface); 1741 int line, col;
1742 eo_lexer_get(ls);
1743 line = ls->line_number, col = ls->column;
1744 check_next(ls, '{');
1745 while (ls->t.token != '}')
1746 parse_implement(ls, iface);
1735 check_match(ls, '}', '{', line, col); 1747 check_match(ls, '}', '{', line, col);
1736} 1748}
1737 1749
1738static void 1750static void
1739parse_constructors(Eo_Lexer *ls) 1751parse_constructors(Eo_Lexer *ls)
1740{ 1752{
1741 PARSE_SECTION parse_constructor(ls); 1753 int line, col;
1754 eo_lexer_get(ls);
1755 line = ls->line_number, col = ls->column;
1756 check_next(ls, '{');
1757 while (ls->t.token != '}')
1758 parse_constructor(ls);
1742 check_match(ls, '}', '{', line, col); 1759 check_match(ls, '}', '{', line, col);
1743} 1760}
1744 1761