On Mar 20, 2013, at 11:15 AM, Jordan Rose <[email protected]> wrote:
> > On Mar 20, 2013, at 11:09 , Fariborz Jahanian <[email protected]> wrote: > >> + Tok.setLocation(Tok.getLocation().getLocWithOffset(-1)); >> + Tok.setKind(tok::at); >> + Tok.setLength(1); > > This is not correct; Objective-C keywords can (sadly) be spelled with spaces. > Is it possible to just keep the original token around instead of overwriting > it when you read the next token? Sadly no, because this introduces an overhead for the common case. Besides, we are handling the error case. We don’t care if it was “@ end” or @end. > > Also, I'm not sure the implicit '}' is a good idea for anything but @end. If > someone does make a typo writing @public, there'll be an unexpected > close-brace later. Agreed. This is the test case: @interface A { @property id PROP; } @end I don’t think we can get this 100% clean in all cases. - Fariborz
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
