Stream: t-compiler/rust-analyzer

Topic: bad error recovery for use statements with curlies

Riccardo D'Ambrosio (Jan 16 2021 at 03:10, on Zulip):

something such as use crate::{ seems to have really bad error recovery overall, it flags nearly every single token in the file as an error. Has this been investigated before? I can try implementing better recovery if its doable since i know the parser pretty well.

Laurențiu (Jan 16 2021 at 08:06, on Zulip):


bjorn3 (Jan 16 2021 at 09:25, on Zulip):

I have been thinking if the lexer can insert one or more fake } token when it finds a keyword that is not allowed inside a use item The lexer can assume that a use item starts at the use keyword and ends at ; or when all { have been closed.

Last update: Jul 28 2021 at 04:45UTC