dotnet / dotnet/csharp-tmLanguage
C# syntax highlighting broken with collection expressions and string interpolation in method calls
- Lingua principale
- TypeScript
- Stelle
- 78
- Fork
- 43
- Merge medio
- 34m
- PR unite (30g)
- 1
Descrizione
Type: Bug
Description: the syntax highlighter incorrectly colors string interpolation when using collection expressions like string[] array = [...] followed by method calls with interpolated strings
``` csharp
Info(
$"Hello: '{thing}'",
$"Foo: {string.Join(", ", fooz)}",
$"Bar: {string.Join(", ", barz)}"
);
```
___
the second comma ", ", betweens the params are orange
**_orange | orange_**
im used to em like this
**_orange | white_**
___
this is expected color of the comma thats a string and the comma that separates the parameters are different
``` csharp
string.Join(", ", fooz)
```
this is what getting both commas are the same color
``` csharp
$"Foo: {string.Join(", ", fooz)}",
```
___
so basically this is expected
**_blue | white_**
this is what im getting
**blue | blue**
Originally from @ezexe in https://github.com/microsoft/vscode/issues/255178
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia riproducendo l’esempio C# nella grammatica di sintassi csharp-tmLanguage e verifica come vengono tokenizzate le espressioni di raccolta, le stringhe interpolate e gli argomenti delle chiamate ai metodi. Il lavoro è completato quando la virgola all’interno di string.Join continua a essere formattata come contenuto della stringa, mentre la virgola che separa i parametri riceve il diverso colore previsto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp, typescript
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100