Skip to content

Fails to parse usage of variable of #173

Description

@privatenumber

Reproduction

import { init, parse } from 'es-module-lexer'

await init

parse('const of=1;console.log(of/1)')

StackBlitz: https://stackblitz.com/edit/stackblitz-starters-ku65d9?file=index.mjs

Although of is an identifier with a special meaning, it is not reserved:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#identifiers_with_special_meanings

This also runs fine in Node/Chrome: const of=1;console.log(of/1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions