diff options
-rw-r--r-- | src/scanner.l | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/scanner.l b/src/scanner.l index 7990108..2342795 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -1029,9 +1029,16 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) yyextra->current->explicitExternal = TRUE; lineCount(yyscanner); } -<FindMembers>{B}*"const"{BN}+ { yyextra->current->type += " const "; - if (yyextra->insideCS) yyextra->current->stat = TRUE; - lineCount(yyscanner); +<FindMembers>{B}*"const"{BN}+ { if (yyextra->insideCS) + { + yyextra->current->type += " const "; + if (yyextra->insideCS) yyextra->current->stat = TRUE; + lineCount(yyscanner); + } + else + { + REJECT; + } } <FindMembers>{B}*"virtual"{BN}+ { yyextra->current->type += " virtual "; yyextra->current->virt = Virtual; |