eo_lexer_syntax_error(ls, "double " msg); \
has_##var = EINA_TRUE;
+#define PARSE_SECTION \
+ int line; \
+ eo_lexer_get(ls); \
+ line = ls->line_number; \
+ check_next(ls, '{'); \
+ while (ls->t.token != '}')
+
static void
error_expected(Eo_Lexer *ls, int token)
{
static void
parse_params(Eo_Lexer *ls, Eina_Bool allow_inout)
{
- int line;
- eo_lexer_get(ls);
- line = ls->line_number;
- check_next(ls, '{');
- while (ls->t.token != '}')
+ PARSE_SECTION
{
parse_param(ls, allow_inout);
ls->tmp.params = eina_list_append(ls->tmp.params, ls->tmp.param);
static void
parse_constructors(Eo_Lexer *ls)
{
- int line;
- eo_lexer_get(ls);
- line = ls->line_number;
- check_next(ls, '{');
- while (ls->t.token != '}')
+ PARSE_SECTION
{
parse_method(ls, EINA_TRUE);
ls->tmp.kls->constructors = eina_list_append(ls->tmp.kls->constructors,
static void
parse_methods(Eo_Lexer *ls)
{
- int line;
- eo_lexer_get(ls);
- line = ls->line_number;
- check_next(ls, '{');
- while (ls->t.token != '}')
+ PARSE_SECTION
{
parse_method(ls, EINA_FALSE);
ls->tmp.kls->methods = eina_list_append(ls->tmp.kls->methods,
static void
parse_properties(Eo_Lexer *ls)
{
- int line;
- eo_lexer_get(ls);
- line = ls->line_number;
- check_next(ls, '{');
- while (ls->t.token != '}')
+ PARSE_SECTION
{
parse_property(ls);
ls->tmp.kls->properties = eina_list_append(ls->tmp.kls->properties,
static void
parse_implements(Eo_Lexer *ls, Eina_Bool iface)
{
- int line;
- eo_lexer_get(ls);
- line = ls->line_number;
- check_next(ls, '{');
- while (ls->t.token != '}')
+ PARSE_SECTION
{
parse_implement(ls, iface);
ls->tmp.kls->implements = eina_list_append(ls->tmp.kls->implements,