On Mar 19, 2013, at 14:21 , jahanian <[email protected]> wrote:

> 
> On Mar 19, 2013, at 1:42 PM, Jordan Rose <[email protected]> wrote:
> 
>> 
>> Would it make sense to not just continue but to pretend instead that the '}' 
>> is there? I feel like that will give us better recovery. (You'd eliminate 
>> those last two errors: "expected '}'" and "missing '@end'".)
> 
> I think by 'pretending' you mean insert a '}' before @end and continue. I 
> thought about this but  I did not want to introduce the bookkeeping
> overhead for the correct case. Do you have a suggestion how to pretend 
> without adding this overhead?

Hm, I see what you mean—right now we unilaterally consume a closing brace when 
we exit the loop. The easiest way to solve this is to extract the parsing loop 
and the T.consumeClose() into a helper function, with an early return for the 
@end case...but that's not exactly pretty. I guess I'll let you make the call 
(or stand by the call you already made).

Jordan
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to