The Wrong Stuff
Jonathan M Davis
jmdavisProg at gmx.com
Sat Sep 25 18:13:20 PDT 2010
On Saturday 25 September 2010 14:25:47 Simen kjaeraas wrote:
> Jérôme M. Berger <jeberger at free.fr> wrote:
> > Jonathan M Davis wrote:
> >> void main()
> >> {
> >>
> >> int property = 7;
> >>
> >> }
> >>
> >> is because property is not a keyword.
> >>
> > I believe that the point Simen and Michel are trying to make is
> >
> > that although "property" is not a keyword, "@property" is.
> >
> > Jerome
>
> Eggzactly.
That could be the case - I'd have to look at the grammar or parser to be sure -
but that would be a poor way to do it if you ever intended to have user-defined
attributes. Normally, @ would be in the grammar as a separate symbol indicating
that the symbol immediately followed was an identifier which was an attribute.
It's quite possible, however, that @property is currently treated as a single
symbol which is a keyword. I doubt that it will stay that way in the long term
though, if it is the case.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list