Skip to content

Fail to reject an invalid escape sequence #30

@bendrissou

Description

@bendrissou

The parser fails to reject the following invalid input:

return "\u{XYZ}"

Only hexadecimal digits should be allowed in the escape sequence, which is not the case in the example above.

From the Lua specification, we have:

The UTF-8 encoding of a Unicode character can be inserted in a literal string with the escape sequence \u{XXX} (note the mandatory enclosing brackets), where XXX is a sequence of one or more hexadecimal digits representing the character code point.

Can you provide feedback on this issue please.

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