summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2017-05-21 10:29:49 (GMT)
committerGitHub <noreply@github.com>2017-05-21 10:29:49 (GMT)
commit9b7b33994f6443c26146837ba13dff94e5eba998 (patch)
treec670f763cadf60fe637252211628751f5af464ce /src
parent88ff6e5931896a0798997a226e846e75a99f8802 (diff)
parent14a0bcc74a121525917aefc8c9034e283e94884b (diff)
downloadDoxygen-9b7b33994f6443c26146837ba13dff94e5eba998.zip
Doxygen-9b7b33994f6443c26146837ba13dff94e5eba998.tar.gz
Doxygen-9b7b33994f6443c26146837ba13dff94e5eba998.tar.bz2
Merge pull request #567 from wiertel/master
Fix C# property initializer parsing
Diffstat (limited to 'src')
-rw-r--r--src/scanner.l10
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);
}