Better error recovery.
authorMarek Safar <marek.safar@gmail.com>
Tue, 22 Jun 2010 20:35:53 +0000 (20:35 -0000)
committerMarek Safar <marek.safar@gmail.com>
Tue, 22 Jun 2010 20:35:53 +0000 (20:35 -0000)
svn path=/trunk/mcs/; revision=159376

mcs/mcs/cs-parser.jay

index c675a206a2b9766fe71d471c0e1a9f2faff5148b..65de9589b80b4014aef0ed3f62f7636f7e38b88f 100644 (file)
@@ -2443,7 +2443,8 @@ remove_accessor_declaration
 event_accessor_block
        : opt_semicolon
          {
-               Report.Error (73, lexer.Location, "An add or remove accessor must have a body");          
+               Report.Error (73, lexer.Location, "An add or remove accessor must have a body");
+               $$ = null;
          }
        | block;
        ;
@@ -3227,10 +3228,10 @@ argument_list
                Report.Error (839, GetLocation ($2), "An argument is missing");
                $$ = $1;
          }
-       | COMMA argument_or_named_argument
+       | COMMA error
          {
                Report.Error (839, GetLocation ($1), "An argument is missing");
-               $$ = $1;
+               $$ = null;
          }
        ;