mono/mono-basic — pull request #4 by lee-m (2012-10-01 15:08:58+00:00)
Title: Add support for automatically implemented properties

Hi,

The linked changes add support for the "automatically implemented properties" feature added in VB10.

I'm not too keen on the parser changes in that we switch from a regular property decl to an auto-imp property decl, so I tried implementing an alternate approach where the parser skipped to the end of the property signature to determine what type of property decl was being parsed, then reset the token stream and then proceeded to parse what we have.

This worked OK to a point, but resulted in incorrect location information for the parsed objects as BaseObject takes its location from tm.CurrentLocation, which in this case was the end of the property signature.

Adjusting tm.CurrentLocation to take the location from the first cached token, if any cached token exists, fixed the incorrect location info but broke implicit line continuations so I adandoned that approach.

I've included tests covering the new feature and added a load of tests covering various errors that may be emitted. All tests successfully pass with no regressions.

Cheers,
Lee