Skip to content

Parsing code like ".5.toString(4)" will cause a error "identifier start after number" #2614

@wangzhikang123

Description

@wangzhikang123

The 'lexer_parse_number' function will process .5. as a number.

Can we modify the code at line 961
do { source_p++; } while (source_p < source_end_p && source_p[0] >= LIT_CHAR_0 && source_p[0] <= LIT_CHAR_9);
to
while (source_p < source_end_p && source_p[0] >= LIT_CHAR_0 && source_p[0] <= LIT_CHAR_9) { source_p++; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourecma coreRelated to core ECMA functionalityparserRelated to the JavaScript parser

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions