eolian: parse the @beta qualifier

This commit is contained in:
Daniel Kolesa 2015-05-08 14:00:07 +01:00
parent a08583d4d4
commit b33e2b21a1
2 changed files with 15 additions and 3 deletions

View File

@ -1108,7 +1108,7 @@ parse_param(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout,
case KW_at_nullable:
if (has_nonull)
eo_lexer_syntax_error(ls, "both nullable and nonull specified");
CASE_LOCK(ls, nullable, "c_only qualifier");
CASE_LOCK(ls, nullable, "nullable qualifier");
par->nullable = EINA_TRUE;
eo_lexer_get(ls);
break;
@ -1255,7 +1255,7 @@ parse_property(Eo_Lexer *ls)
Eina_Bool has_get = EINA_FALSE, has_set = EINA_FALSE,
has_keys = EINA_FALSE, has_values = EINA_FALSE,
has_protected = EINA_FALSE, has_class = EINA_FALSE,
has_c_only = EINA_FALSE;
has_c_only = EINA_FALSE, has_beta = EINA_FALSE;
prop = calloc(1, sizeof(Eolian_Function));
prop->klass = ls->tmp.kls;
prop->type = EOLIAN_UNRESOLVED;
@ -1281,6 +1281,11 @@ parse_property(Eo_Lexer *ls)
prop->is_c_only = EINA_TRUE;
eo_lexer_get(ls);
break;
case KW_at_beta:
CASE_LOCK(ls, beta, "beta qualifier");
prop->is_beta = EINA_TRUE;
eo_lexer_get(ls);
break;
default:
goto body;
}
@ -1329,7 +1334,8 @@ parse_method(Eo_Lexer *ls)
Eina_Bool has_const = EINA_FALSE, has_params = EINA_FALSE,
has_return = EINA_FALSE, has_legacy = EINA_FALSE,
has_protected = EINA_FALSE, has_class = EINA_FALSE,
has_eo = EINA_FALSE, has_c_only = EINA_FALSE;
has_eo = EINA_FALSE, has_c_only = EINA_FALSE,
has_beta = EINA_FALSE;
meth = calloc(1, sizeof(Eolian_Function));
meth->klass = ls->tmp.kls;
meth->type = EOLIAN_METHOD;
@ -1360,6 +1366,11 @@ parse_method(Eo_Lexer *ls)
meth->is_c_only = EINA_TRUE;
eo_lexer_get(ls);
break;
case KW_at_beta:
CASE_LOCK(ls, beta, "beta qualifier");
meth->is_beta = EINA_TRUE;
eo_lexer_get(ls);
break;
default:
goto body;
}

View File

@ -119,6 +119,7 @@ struct _Eolian_Function
Eina_Bool set_only_legacy: 1;
Eina_Bool is_class :1;
Eina_Bool is_c_only :1;
Eina_Bool is_beta :1;
Eina_List *ctor_of;
Eolian_Class *klass;
};