summaryrefslogtreecommitdiff
path: root/src/lib/eolian
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-08-29 13:46:35 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-08-29 13:58:16 +0200
commit9c018613ee9a479ae49b4927ac9ff166b2fd864e (patch)
treeb5995006b2a56897838e28fc4d9144be10bd4e7f /src/lib/eolian
parentf7cfd0f8339bcfa13a89a7ce0a1c005c77bf05c7 (diff)
eolian: drop @cref
In the end this was just a failed experiment that didn't turn out to be practical. For now, revert back to ptr(const(T)) until a proper replacement for pointer syntax is added.
Diffstat (limited to 'src/lib/eolian')
-rw-r--r--src/lib/eolian/eo_lexer.h2
-rw-r--r--src/lib/eolian/eo_parser.c8
2 files changed, 2 insertions, 8 deletions
diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h
index 805589eddd..1611b24619 100644
--- a/src/lib/eolian/eo_lexer.h
+++ b/src/lib/eolian/eo_lexer.h
@@ -33,7 +33,7 @@ enum Tokens
33 KW(keys), KW(legacy), KW(methods), KW(mixin), KW(params), \ 33 KW(keys), KW(legacy), KW(methods), KW(mixin), KW(params), \
34 KW(parse), KW(parts), KW(ptr), KW(set), KW(type), KW(values), KW(var), KW(requires), \ 34 KW(parse), KW(parts), KW(ptr), KW(set), KW(type), KW(values), KW(var), KW(requires), \
35 \ 35 \
36 KWAT(auto), KWAT(beta), KWAT(c_name), KWAT(const), KWAT(cref), \ 36 KWAT(auto), KWAT(beta), KWAT(c_name), KWAT(const), \
37 KWAT(empty), KWAT(extern), KWAT(free), KWAT(hot), KWAT(in), KWAT(inout), \ 37 KWAT(empty), KWAT(extern), KWAT(free), KWAT(hot), KWAT(in), KWAT(inout), \
38 KWAT(no_unused), KWAT(nullable), KWAT(optional), KWAT(out), KWAT(owned), \ 38 KWAT(no_unused), KWAT(nullable), KWAT(optional), KWAT(out), KWAT(owned), \
39 KWAT(private), KWAT(property), KWAT(protected), KWAT(restart), \ 39 KWAT(private), KWAT(property), KWAT(protected), KWAT(restart), \
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index cf8a25bc8c..b24a35152a 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -1058,13 +1058,12 @@ parse_param(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout,
1058{ 1058{
1059 Eina_Bool has_optional = EINA_FALSE, 1059 Eina_Bool has_optional = EINA_FALSE,
1060 has_owned = EINA_FALSE; 1060 has_owned = EINA_FALSE;
1061 Eina_Bool cref = (ls->t.kw == KW_at_cref);
1062 Eolian_Function_Parameter *par = calloc(1, sizeof(Eolian_Function_Parameter)); 1061 Eolian_Function_Parameter *par = calloc(1, sizeof(Eolian_Function_Parameter));
1063 par->param_dir = EOLIAN_IN_PARAM; 1062 par->param_dir = EOLIAN_IN_PARAM;
1064 FILL_BASE(par->base, ls, ls->line_number, ls->column, FUNCTION_PARAMETER); 1063 FILL_BASE(par->base, ls, ls->line_number, ls->column, FUNCTION_PARAMETER);
1065 *params = eina_list_append(*params, par); 1064 *params = eina_list_append(*params, par);
1066 eolian_object_ref(&par->base); 1065 eolian_object_ref(&par->base);
1067 if (cref || (allow_inout && (ls->t.kw == KW_at_in))) 1066 if (allow_inout && (ls->t.kw == KW_at_in))
1068 { 1067 {
1069 par->param_dir = EOLIAN_IN_PARAM; 1068 par->param_dir = EOLIAN_IN_PARAM;
1070 eo_lexer_get(ls); 1069 eo_lexer_get(ls);
@@ -1098,11 +1097,6 @@ parse_param(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout,
1098 eo_lexer_expr_release_ref(ls, par->value); 1097 eo_lexer_expr_release_ref(ls, par->value);
1099 check_match(ls, ')', '(', line, col); 1098 check_match(ls, ')', '(', line, col);
1100 } 1099 }
1101 if (cref)
1102 {
1103 par->type->is_const = EINA_TRUE;
1104 par->type->is_ptr = EINA_TRUE;
1105 }
1106 for (;;) switch (ls->t.kw) 1100 for (;;) switch (ls->t.kw)
1107 { 1101 {
1108 case KW_at_optional: 1102 case KW_at_optional: