summaryrefslogtreecommitdiffstats
path: root/eo_tokenizer.rl
diff options
context:
space:
mode:
Diffstat (limited to 'eo_tokenizer.rl')
-rw-r--r--eo_tokenizer.rl18
1 files changed, 6 insertions, 12 deletions
diff --git a/eo_tokenizer.rl b/eo_tokenizer.rl
index 161448a..961faef 100644
--- a/eo_tokenizer.rl
+++ b/eo_tokenizer.rl
@@ -238,9 +238,8 @@ _eo_tokenizer_accessor_get(Eo_Tokenizer *toknz, Eo_Accessor_Type type)
INF(" %s", toknz->tmp.accessor->ret.comment);
}
- action end_legacy_name {
- const char *legacy = _eo_tokenizer_token_get(toknz, fpc);
- toknz->tmp.accessor->legacies = eina_list_append(toknz->tmp.accessor->legacies, legacy);
+ action end_legacy {
+ toknz->tmp.accessor->legacy = _eo_tokenizer_token_get(toknz, fpc);
}
action end_accessor {
@@ -254,16 +253,14 @@ _eo_tokenizer_accessor_get(Eo_Tokenizer *toknz, Eo_Accessor_Type type)
rettype_comment = ws* eo_comment %end_rettype_comment;
rettype = 'return' ws+ alpha+ >save_fpc (alnum_u | '*' | ws )+ %end_rettype end_statement rettype_comment?;
- legacy_item = ident %end_legacy_name ignore*;
- legacy_item_next = list_separator ignore* legacy_item;
- legacies = 'legacy' ignore* begin_def ignore* (legacy_item legacy_item_next*)? end_def;
+ legacy = 'legacy' ws+ ident %end_legacy end_statement;
tokenize_accessor := |*
ignore+; #=> show_ignore;
eo_comment => end_accessor_comment;
comment => show_comment;
rettype;
- legacies;
+ legacy;
end_def => end_accessor;
any => show_error;
*|;
@@ -572,7 +569,7 @@ void
eo_tokenizer_dump(Eo_Tokenizer *toknz)
{
const char *s;
- Eina_List *k, *l, *m, *n;
+ Eina_List *k, *l, *m;
Eo_Class_Def *kls;
Eo_Property_Def *prop;
@@ -602,10 +599,7 @@ eo_tokenizer_dump(Eo_Tokenizer *toknz)
printf(" accessor: %s : %s (%s)\n",
accessor->ret.type, _accessor_type_str[accessor->type],
accessor->comment);
- printf(" legacy :");
- EINA_LIST_FOREACH(accessor->legacies, n, s)
- printf(" %s", s);
- printf("\n");
+ printf(" legacy : %s\n", accessor->legacy);
}
}