mcs/parser: make it so that an incomplete statement without a semicolon
authorMiguel de Icaza <miguel@gnome.org>
Mon, 23 Jan 2012 00:19:39 +0000 (19:19 -0500)
committerMiguel de Icaza <miguel@gnome.org>
Mon, 23 Jan 2012 00:19:39 +0000 (19:19 -0500)
commita4f6611a12e62bec3753f34a64102e7180ff46d5
tree6f3fcccccd3045d7ab85ddf77dde83ced90547e6
parentfb0fdcd98cff272b06f7df7911cb694cc740d1ce
mcs/parser: make it so that an incomplete statement without a semicolon
continue parsing as if there was a brace as the next token in the stream.

This allows the following sample to report only the missing semicolon
as error 1525:

using System;
class Program
{
   public static void Main ()
   {
       TestMethod (delegate (object sender, EventArgs args) {

       })
   }
}

Instead of reporting both 1525 and later on a second 1525 for the
end-of-file token
mcs/mcs/Makefile
mcs/mcs/cs-parser.jay
mcs/mcs/cs-tokenizer.cs