diff options
Diffstat (limited to 'src/scanner.l')
-rw-r--r-- | src/scanner.l | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/scanner.l b/src/scanner.l index 9ff082d..632c8a5 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -6198,6 +6198,14 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } } <CSAccessorDecl>"{" { curlyCount++; } +<CSAccessorDecl>"}"{B}*"=" { + // fall back to next rule if it's not the right bracket + if (curlyCount != 0) REJECT; + current->initializer = "="; + current->endBodyLine=yyLineNr; + lastInitializerContext = FindMembers; + BEGIN(ReadInitializer); + } <CSAccessorDecl>"}" { if (curlyCount) { @@ -6207,6 +6215,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) { mtype = Method; virt = Normal; + // not really important, but while we are at it + current->endBodyLine=yyLineNr; unput(';'); BEGIN(FindMembers); } |