r177549 - Objective-C [qoi] more gracefull recovery when

Jordan Rose jordan_rose at apple.com
Wed Mar 20 11:15:08 PDT 2013


On Mar 20, 2013, at 11:09 , Fariborz Jahanian <fjahanian at apple.com> 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?

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130320/6d8619f1/attachment.html>


More information about the cfe-commits mailing list