microsoft / microsoft/TypeScript-TmLanguage

Add ability to target keywords that take you out of the normal flow of execution

Abierto
#619 1 comentario 3 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Suggestion
Lenguaje dominante
TypeScript
Estrellas
471
Forks
149
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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:

image

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con los archivos de gramática TypeScript TextMate utilizados por las gramáticas de VS Code, Sublime Text y Atom, e inspecciona los scopes asignados a return, throw, break y continue frente a las palabras clave existentes de bucles y try/catch. Se considera completado cuando esas palabras clave de flujo de salida tienen scopes distintos que pueden resaltarse de forma independiente sin cambiar los scopes de for, try o catch.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript, typescript
Área
tooling
Tipo de issue
Nueva funcionalidad
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
38/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.