microsoft/TypeScript-TmLanguage

Suggestion: give `default` another token name when modifying the things being exported

OzelotVanilla opened this issue · 1 comments

JavaScript and TypeScript Nightly version: 5.3.0-dev.20231015

Code

export default async function () { }

image

Currently default at this position is assigned keyword.control.default, while it is overlapping with the default in the switch statement.

To make it clearer, it might be better to assign it with something like storage.modifier.default like the async.

I discovered that all control statement keyword like break or continue shares the scope keyword.control.loop, and keyword.control.default seems only to be used in export or import statement. So this question could be solved by:

Simply set keyword.control.default's value as the modifier, since the default keyword in loop uses another scope.