[mcs] Add additional doc reset after property initializers. Fixes #35087
[mono.git] / mcs / mcs / cs-parser.jay
index fb6a3e87873597f165ac3c175682518293449355..b0c771f7207b2eb26aa12a288bd58e11f811aae3 100644 (file)
@@ -1829,9 +1829,9 @@ property_declaration
          accessor_declarations 
          {
                lexer.PropertyParsing = false;
-               
+
                if (doc_support)
-                       current_property.DocComment = ConsumeStoredComment ();                          
+                       current_property.DocComment = ConsumeStoredComment ();
          }
          CLOSE_BRACE
          {
@@ -1893,6 +1893,9 @@ opt_property_initializer
                lbag.AppendToMember (current_property, GetLocation ($1), GetLocation ($4));
                end_block (GetLocation ($4));
                current_local_parameters = null;
+
+               if (doc_support)
+                       Lexer.doc_state = XmlCommentState.Allowed;
          }
        ;