Blame doxygen-1.8.13-C#-property-initializer-parsing.patch

Than Ngo 248e03
commit 14a0bcc74a121525917aefc8c9034e283e94884b
Than Ngo 248e03
Author: Piotr Szydełko <wiertel@wiertel.info>
Than Ngo 248e03
Date:   Sat May 20 08:14:27 2017 +0200
Than Ngo 248e03
Than Ngo 248e03
    Fix C# property initializer parsing
Than Ngo 248e03
    
Than Ngo 248e03
    int Property {get; set;} = 23;
Than Ngo 248e03
    The parser was ending the property at the closing bracket,
Than Ngo 248e03
    which resulted in the initializer being assigned to the following property.
Than Ngo 248e03
Than Ngo 248e03
diff --git a/src/scanner.l b/src/scanner.l
Than Ngo 248e03
index 9ff082d4..632c8a51 100644
Than Ngo 248e03
--- a/src/scanner.l
Than Ngo 248e03
+++ b/src/scanner.l
Than Ngo 248e03
@@ -6198,6 +6198,14 @@ OPERATOR  "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
Than Ngo 248e03
 					  }
Than Ngo 248e03
   					}
Than Ngo 248e03
 <CSAccessorDecl>"{"			{ curlyCount++; }
Than Ngo 248e03
+<CSAccessorDecl>"}"{B}*"="		{
Than Ngo 248e03
+					  // fall back to next rule if it's not the right bracket
Than Ngo 248e03
+					  if (curlyCount != 0) REJECT;
Than Ngo 248e03
+					  current->initializer = "=";
Than Ngo 248e03
+					  current->endBodyLine=yyLineNr;
Than Ngo 248e03
+					  lastInitializerContext = FindMembers;
Than Ngo 248e03
+					  BEGIN(ReadInitializer);
Than Ngo 248e03
+					}
Than Ngo 248e03
 <CSAccessorDecl>"}"			{ 
Than Ngo 248e03
                                           if (curlyCount) 
Than Ngo 248e03
                                           {
Than Ngo 248e03
@@ -6207,6 +6215,8 @@ OPERATOR  "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
Than Ngo 248e03
 					  {
Than Ngo 248e03
   					    mtype = Method;
Than Ngo 248e03
                                             virt = Normal;
Than Ngo 248e03
+					    // not really important, but while we are at it
Than Ngo 248e03
+					    current->endBodyLine=yyLineNr;
Than Ngo 248e03
                                             unput(';');
Than Ngo 248e03
 					    BEGIN(FindMembers);
Than Ngo 248e03
 					  }