Syntax highlighting broken in lambda after type statement without semicolon
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 38/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- À l'abandon
- Stack technique
- typescript
Piste de recherche
Ouvrez le TypeScript Playground lié et reproduisez la différence de coloration syntaxique dans VS Code 1.61.2 à l’aide de la lambda et des déclarations de type fournies. Examinez le comportement de la grammaire TextMate ainsi que la sortie scope/token autour de l’instruction de type sans point-virgule. Le travail est considéré comme terminé lorsque type et const reçoivent la même coloration à l’intérieur et à l’extérieur de la lambda sans nécessiter de point-virgule.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Bug Report
🔎 Search Terms
syntax highlight semicolon lambda
🕗 Version & Regression Information
- This is not a bug with the compiler
- This is a VSCode syntax highlighting bug
- VSCode Version 1.61.2
Version: 1.61.2 (user setup)
Commit: 6cba118ac49a1b88332f312a8f67186f7f3c1643
Date: 2021-10-19T14:57:20.575Z
Electron: 13.5.1
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19043
⏯ Playground Link
Playground link with relevant code
💻 Code
declare function doFoo(arg: any): void
type A = number
doFoo(() => {
type B = number
const b = 5
})
const a = 1
🙁 Actual behavior
type and const get colored oddly inside the lambda.

Notice that the colors are different in and out of the lambda.
Scope/token debugging:

🙂 Expected behavior
The syntax highlighting should look like this:

Notice that colors are the same in and out of the lambda. I added a semicolon in this case to the type statement to workaround the issue.
Scope/token debugging:

- Langage dominant
- TypeScript
- Étoiles
- 471
- Forks
- 149
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de microsoft/TypeScript-TmLanguage
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
microsoft/TypeScript-TmLanguage#1071 ·
-
triste Ouverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 5/100
microsoft/TypeScript-TmLanguage#1078 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
microsoft/TypeScript-TmLanguage#1076 · 6 commentaires ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 55/100
microsoft/TypeScript-TmLanguage#1074 · 2 commentaires ·
-
typescript-basics: fix highlighting for triple-slash reference directives with preserve="true" Ouverte
Difficulté 1/5 1-3 heures Accessibilité débutants 58/100
microsoft/TypeScript-TmLanguage#1066 · 1 commentaire ·
Toutes les issues de microsoft/TypeScript-TmLanguage
Issues similaires
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
-
Crush Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
ElementsProject/cln-application#167 · 1 commentaire · 1 réaction ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Quantco/pnpm-licenses#17 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100