From fe6e01463b4b3c62b7efc9e523090202147d108d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 25 Nov 2013 11:40:16 +0100 Subject: add inherits support --- eo_tokenizer.rl | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; *|; -- cgit v1.1-2-g2b99