Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(parser): remove TokenValue::RegExp from Token #1926

Merged
merged 1 commit into from
Jan 8, 2024

Commits on Jan 8, 2024

  1. refactor(parser): remove TokenValue::RegExp from Token

    This PR is part of #1880.
    
    `Token` size is reduced from 48 to 40 bytes.
    
    To reconstruct the regex pattern and flags within the parser , the regex string is
    re-parsed from the end by reading all valid flags.
    
    In order to make things work nicely, the lexer will no longer recover
    from a invalid regex.
    Boshen committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    27c3023 View commit details
    Browse the repository at this point in the history