summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eo_tokenizer.rl4
1 files changed, 4 insertions, 0 deletions
diff --git a/eo_tokenizer.rl b/eo_tokenizer.rl
index 75ccba1..e2d5f3e 100644
--- a/eo_tokenizer.rl
+++ b/eo_tokenizer.rl
@@ -127,6 +127,8 @@ _eo_tokenizer_class_get(Eo_Tokenizer *toknz, char *p)
# TOKENIZE CLASS
action end_class_comment {
+ if (toknz->tmp.kls->comment != NULL)
+ ABORT(toknz, "class %s has already a comment", toknz->tmp.kls->name);
toknz->tmp.kls->comment = _eo_tokenizer_token_get(toknz, fpc-1);
}
@@ -182,6 +184,8 @@ _eo_tokenizer_class_get(Eo_Tokenizer *toknz, char *p)
}
action end_class_name {
+ if (toknz->tmp.kls != NULL)
+ ABORT(toknz, "there is a pending class definition %s", toknz->tmp.kls->name);
toknz->tmp.kls = _eo_tokenizer_class_get(toknz, fpc);
}