dotnet/roslyn

VB parsing string-interpolation in erroneous code has poor error recovery

Open

#3.617 geöffnet am 22. Juni 2015

Auf GitHub ansehen
 (15 Kommentare) (0 Reaktionen) (1 zugewiesene Person)C# (4.257 Forks)batch import
Area-CompilersBugConcept-Diagnostic Clarityhelp wanted

Repository-Metriken

Stars
 (20.414 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 6T 17h) (256 gemergte PRs in 30 T)

Beschreibung

Watch this video: string-interpolation-parsing

I get into this situation often when I'm copying+pasting code around, or breaking a method up into smaller methods by deleting "sub" and then re-adding a bunch of "sub" and "end sub" statements where appropriate.

WHAT I OBSERVE: When there's a valid statement, regular strings and interpolated string parse fine.

When there's an invalid statement, regular strings parse fine, but interpolated strings don't recognize their terminating quote, so the remainder of the entire file gets "stringed out".

WHAT I EXPECT: interpolated strings should believe themselves terminated at the terminating quote, just like regular strings do.

Contributor Guide