<div class="gmail_quote">On Mon, Sep 17, 2012 at 7:58 AM, Ahmed Bougacha <span dir="ltr"><<a href="mailto:ahmed.bougacha@gmail.com" target="_blank">ahmed.bougacha@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<div class="im"><br>
On Tue, Sep 11, 2012 at 7:35 AM, Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>> wrote:<br>
><br>
> It looks like you're now consuming the ',' before bailing out. I'm not sure<br>
> whether that's detectable, but you should leave it in the token stream<br>
> anyway so other parts of the compiler can recover better (for instance, we<br>
> could offer a ',' -> ';' typo correction in this situation by extending<br>
> IsCommonTypo). Given that you're now looking a couple of tokens past the<br>
> comma, it'll be best to go back to your former approach of putting it back<br>
> into the token stream if you find that it's a typo.<br>
<br>
</div>We reverted back to leaving the comma, which, when handled by<br>
IsCommonTypo, gives the expected errors.<br></blockquote><div><br></div><div>Thanks! I've checked this in as r164085, along with some more test cases. I also moved the isDeclarationStatement checks to a new Parser method, isKnownToBeDeclarationSpecifier.</div>
<div><br></div><div>-- Richard</div></div>