summaryrefslogtreecommitdiffstats
path: root/eo_tokenizer.rl
diff options
context:
space:
mode:
Diffstat (limited to 'eo_tokenizer.rl')
-rw-r--r--eo_tokenizer.rl9
1 files changed, 8 insertions, 1 deletions
diff --git a/eo_tokenizer.rl b/eo_tokenizer.rl
index 1f98b89..44e344e 100644
--- a/eo_tokenizer.rl
+++ b/eo_tokenizer.rl
@@ -100,6 +100,7 @@ _eo_tokenizer_class_get(Eo_Tokenizer *toknz, char *p)
newline = cr @inc_line;
ignore = (0x00..0x20 - cr)+ newline?;
+ eo_comment = "/*@" ignore* %save_fpc ( any | '\n' @inc_line )* :>> "*/";
c_comment = "/*" ( any | '\n' @inc_line )* :>> "*/";
cpp_comment = "//" (any - cr)* newline;
comment = ( c_comment | cpp_comment ) > save_line;
@@ -137,12 +138,17 @@ _eo_tokenizer_class_get(Eo_Tokenizer *toknz, char *p)
fgoto main;
}
+ action end_eo_comment {
+ toknz->tmp_kls->comment = _eo_tokenizer_token_get(toknz, fpc-1);
+ }
+
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;
+ eo_comment => end_eo_comment;
comment => show_comment;
inherits;
end_def => end_class;
@@ -283,7 +289,8 @@ eo_tokenizer_dump(Eo_Tokenizer *toknz)
EINA_LIST_FOREACH(toknz->classes, k, kls)
{
- printf("Class: %s\n", kls->name);
+ printf("Class: %s (%s)\n",
+ kls->name, (kls->comment ? kls->comment : "-"));
printf(" inherits from :");
EINA_LIST_FOREACH(kls->inherits, l, s)
printf(" %s", s);