Skip to content

(JavaScript) Function names with a prefix shared with a built-in global are confused for a global #3870

@arnog

Description

@arnog

Which language seems to have the issue?
JavaScript and TypeScript

Are you using highlight or highlightAuto?
highlight

Sample Code to Reproduce

eval();
neval();
eval2();
Screenshot 2023-09-22 at 07 25 08

Expected behavior

An identifier that starts with the prefix of a built-in global should not be recognized as that built in global. For example, the identifiers eval2, evaluate, evaluation are all confused with the built-in global eval and highlighted incorrectly.

The expected highlithing:

Screenshot 2023-09-22 at 07 25 49

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions