Skip to content

Parser: cannot parse let?.x in script #16839

@overlookmotel

Description

@overlookmotel

This appears to be valid in scripts (but not in modules):

let?.x

Playground

Certainly Acorn, Espree, and TS-ESLint can all parse it:

We seem to be able to parse let.x, just not let?.x.

Discovered this oddity in ESLint's test cases.

Metadata

Metadata

Labels

A-parserArea - ParserC-bugCategory - Bug

Type

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions