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)
downloadefl-423629f81739813f9eaa1ea190c635e9486249d7.tar.gz
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 @@
eo_lexer_syntax_error(ls, "double " msg); \
has_##var = EINA_TRUE;
-#define PARSE_SECTION \
- int line, col; \
- eo_lexer_get(ls); \
- line = ls->line_number; \
- col = ls->column; \
- check_next(ls, '{'); \
- while (ls->t.token != '}')
-
static void
error_expected(Eo_Lexer *ls, int token)
{
@@ -1302,7 +1294,12 @@ static void
parse_params(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout,
Eina_Bool is_vals)
{
- PARSE_SECTION parse_param(ls, params, allow_inout, is_vals);
+ int line, col;
+ eo_lexer_get(ls);
+ line = ls->line_number, col = ls->column;
+ check_next(ls, '{');
+ while (ls->t.token != '}')
+ parse_param(ls, params, allow_inout, is_vals);
check_match(ls, '}', '{', line, col);
}
@@ -1717,28 +1714,48 @@ parse_event(Eo_Lexer *ls)
static void
parse_methods(Eo_Lexer *ls)
{
- PARSE_SECTION parse_method(ls, EINA_FALSE);
+ int line, col;
+ eo_lexer_get(ls);
+ line = ls->line_number, col = ls->column;
+ check_next(ls, '{');
+ while (ls->t.token != '}')
+ parse_method(ls, EINA_FALSE);
check_match(ls, '}', '{', line, col);
}
static void
parse_properties(Eo_Lexer *ls)
{
- PARSE_SECTION parse_property(ls);
+ int line, col;
+ eo_lexer_get(ls);
+ line = ls->line_number, col = ls->column;
+ check_next(ls, '{');
+ while (ls->t.token != '}')
+ parse_property(ls);
check_match(ls, '}', '{', line, col);
}
static void
parse_implements(Eo_Lexer *ls, Eina_Bool iface)
{
- PARSE_SECTION parse_implement(ls, iface);
+ int line, col;
+ eo_lexer_get(ls);
+ line = ls->line_number, col = ls->column;
+ check_next(ls, '{');
+ while (ls->t.token != '}')
+ parse_implement(ls, iface);
check_match(ls, '}', '{', line, col);
}
static void
parse_constructors(Eo_Lexer *ls)
{
- PARSE_SECTION parse_constructor(ls);
+ int line, col;
+ eo_lexer_get(ls);
+ line = ls->line_number, col = ls->column;
+ check_next(ls, '{');
+ while (ls->t.token != '}')
+ parse_constructor(ls);
check_match(ls, '}', '{', line, col);
}