Skip to content

Identifier with \u{xxxx} doesn't make validation #1985

Open

Description

@wrt0w0

Steps to reproduce

es.parse('a\\u{0022}b=1')

Expected output

pares error

Actual output

{
    "type": "Program",
    "body": [
        {
            "type": "ExpressionStatement",
            "expression": {
                "type": "AssignmentExpression",
                "operator": "=",
                "left": {
                    "type": "Identifier",
                    "name": "a\"b"
                },
                "right": {
                    "type": "Literal",
                    "value": 1,
                    "raw": "1"
                }
            }
        }
    ],
    "sourceType": "script"
}

Problem location

scanner.ts:462(getComplexIdentifier)
scanner.ts:490(getComplexIdentifier)

Relevant references

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions