-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed as not planned
Closed as not planned
Copy link
Labels
breaking changeThis change will require a new major version to be releasedThis change will require a new major version to be releasedbugSomething isn't workingSomething isn't workingpackage: typescript-estreeIssues related to @typescript-eslint/typescript-estreeIssues related to @typescript-eslint/typescript-estreewontfixThis will not be worked onThis will not be worked on
Description
In #1487 we made a change to mark all keywords output as Keyword
tokens.
I've since learned that this was incorrect for some of them.
There are keywords which are classed as "contextual keywords". These keywords are keywords when they're in a their keyword position, and identifiers when they're in an identifier position.
So we need to either:
- provide context to the token parser so it can create the correct token, or
- always parse them as
Identifier
tokens (this is the route that espree/acorn takes)
The list of contextual keywords:
https://github.com/microsoft/TypeScript/blob/eeff036519362513cc86a95e260a281a725295f4/src/compiler/types.ts#L255-L285
Metadata
Metadata
Assignees
Labels
breaking changeThis change will require a new major version to be releasedThis change will require a new major version to be releasedbugSomething isn't workingSomething isn't workingpackage: typescript-estreeIssues related to @typescript-eslint/typescript-estreeIssues related to @typescript-eslint/typescript-estreewontfixThis will not be worked onThis will not be worked on