microsoft / microsoft/TypeScript-TmLanguage
Add ability to target keywords that take you out of the normal flow of execution
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 471
- Fork
- 149
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
TS and JS Grammar Extension version: 0.0.41 / latest
I'd like to be able to highlight keywords that take you out of the normal flow of execution. By this I mean keywords that cause code to jump somewhere else when running. For example return, throw, break, continue.
Because these keywords take you out of the normal flow of execution they are very important, and not something you'd want to miss when scanning code, so I think it would be great if we could target them separately to ensure they aren't missed.
I'd like the ability to highlight them as more important when compared to other keywords such as if, for, while, try, catch, etc.
Currently break and continue are in the same scope as for, while, do, etc (keyword.control.loop). And throw is in the same scope as try and catch (keyword.control.trycatch). Because of this it isn't possible to highlight them separately.
Example:

In the screenshot above I want to highlight continue and throw, but doing so also highlights for, try and catch whereas I'd like those to remain grey.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dai file della grammatica TypeScript TextMate utilizzati dalle grammatiche di VS Code, Sublime Text e Atom, e analizza gli scopes assegnati a return, throw, break e continue rispetto alle parole chiave esistenti dei cicli e di try/catch. Il lavoro è completato quando queste parole chiave del flusso di uscita hanno scopes distinti che possono essere evidenziati in modo indipendente senza modificare gli scopes di for, try o catch.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, typescript
- Ambito
- tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100