dotnet / dotnet/csharp-tmLanguage
Non-ASCII identifier syntax highlighting
- Lingua principale
- TypeScript
- Stelle
- 78
- Fork
- 43
- Merge medio
- 34m
- PR unite (30g)
- 1
Descrizione
The following code [compiles and run](https://sharplab.io/#v2:EYLgxg9gTgpgtADwGwBYA0AXEUCuA7AHwAEAmARgFgAoIgZgAJT6Bhagb2vq8bKR4AZ6wAIZQAFAEp6Aemn1AKOSB4P87cOVbhsYB2egCIRUXQG4VXAL7VTMuUV4D6AMwBvTyVdt9bggDo5+/JCRffwAxIL9+MMlrekAMcno4ehgEAAcYMAwYABN6YIDw0ILIvgwIegALYQA3GHoAZ2EAW1rIABtoemE6oVF6DoBZYQBLPCs1TW4iHV0MBAxjKwsqdxISMasNWwBOMWdXCQkjGPjE5LSM7McXelKK6tqG5vo2jq6eqD6PwZGNybIdvKBPJhYFISSHY4JJKpdKZHKAoogiJhG5lSo1epNFoQdofN4GT70b6jdQTHg7Azgo6yBTKUnmahmIA==), but the syntax highlighting in GitHub and VSCode do not identify escaped or unescaped non-ascii identifiers properly:
```c#
using System;
public class C
{
static string bar() // ✔️
{
return "bar";
}
// static string föö()
static string \u0066\u00F6\u00F6() // ✘ - expected \u0066\u00F6\u00F6 to have same color as bar or Main
{
return "txt";
}
public static void Main()
{
Console.WriteLine(föö()); // ✘ - expected föö to have same color as bar or Main
Console.WriteLine(\u0066\u00F6\u00F6()); // ✘ - expected \u0066\u00F6\u00F6 to have same color as bar or Main
Console.WriteLine(bar()); // ✔️
}
}
```
VSCode is at least highlighting `föö()` properly (GitHub linguist probably needs an update to sync with the latest grammar update which eventually consumes this repo).
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Usa la riproduzione in C# presente nell’issue come punto di partenza e analizza la grammatica responsabile dell’evidenziazione degli identificatori; non è indicato alcun file o test specifico. Verifica gli identificatori di metodo non ASCII, sia con escape sia senza escape, rispetto agli identificatori ordinari, usando un’evidenziazione corrispondente come criterio di completamento.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp
- 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