Skip to content

Extend lexer to cover non-ASCII unicode cases #242

Closed
@graydon

Description

@graydon

There are a few parts to this:

  • Implement the PEP 3131 rule for identifier tokenization: notice when you leave ASCII range, switch to XID_Start/XID_Continue, NFKC-normalize. This is expensive but it'll be a cold path in any ASCII-range input.
  • Copy of the rules in rustboot's handling of character and string literals (handle unicode escapes in those contexts, as well as general non-normalizing UTF-8 input).

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