summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2013-11-25 11:40:16 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2013-11-25 11:40:16 +0100
commitfe6e01463b4b3c62b7efc9e523090202147d108d (patch)
tree1ac6a6bf4ba2fd6a503ec1b43ed9d9ef5d1065cb
parentc523229976f8fcddd5cd2f4d325a54ae9faa7d7d (diff)
downloadeo_tokenizer-fe6e01463b4b3c62b7efc9e523090202147d108d.zip
eo_tokenizer-fe6e01463b4b3c62b7efc9e523090202147d108d.tar.gz
add inherits support
-rw-r--r--eo_tokenizer.rl10
1 files changed, 10 insertions, 0 deletions
diff --git a/eo_tokenizer.rl b/eo_tokenizer.rl
index bee773b..bd740b2 100644
--- a/eo_tokenizer.rl
+++ b/eo_tokenizer.rl
@@ -121,6 +121,11 @@ _eo_tokenizer_class_get(Eo_Tokenizer *toknz, char *p)
# TOKENIZE CLASS
+ action end_inherit_name {
+ const char *base = _eo_tokenizer_token_get(toknz, fpc);
+ toknz->tmp_kls->inherits = eina_list_append(toknz->tmp_kls->inherits, base);
+ }
+
action end_class {
INF("end class:%s", toknz->tmp_kls->name);
toknz->classes= eina_list_append(toknz->classes, toknz->tmp_kls);
@@ -129,9 +134,14 @@ _eo_tokenizer_class_get(Eo_Tokenizer *toknz, char *p)
fgoto main;
}
+ inherit_item = alpha_u+ >save_fpc %end_inherit_name ignore*;
+ inherit_item_next = list_separator ignore* inherit_item;
+ inherits = 'inherits' ignore* begin_def ignore* (inherit_item inherit_item_next*)? end_def;
+
tokenize_class := |*
ignore+; #=> show_ignore;
comment => show_comment;
+ inherits;
end_def => end_class;
any => show_error;
*|;