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

Update regex literal lexing and emission #40595

Merged
merged 2 commits into from
Dec 18, 2021

Commits on Dec 17, 2021

  1. Integrate experimental string processing modules and enable end-to-en…

    …d regex.
    
    - Checkout apple/swift-experimental-string-processing using a tag.
    - Build `_MatchingEngine` as part of libswift (`ExperimentalRegex`) using sources from the package.
    - Parse regex literals using the parser from `_MatchingEngine`.
    - Build both `_MatchingEngine` and `_StringProcessing` as part of core libs using sources from the package.
    - Use `Regex<DynamicCaptures>` as the default regex type until we finalize swiftlang/swift-experimental-string-processing#68.
    rxwei authored and hamishknight committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    300cbab View commit details
    Browse the repository at this point in the history
  2. Update regex literal lexing and emission

    Update the lexing implementation to defer to the
    regex library, which will pass back the pointer
    from to resume lexing, and update the emission to
    call the new `Regex(_regexString:version:)`
    overload, that will accept the regex string with
    delimiters.
    
    Because this uses the library's lexing
    implementation, the delimiters are now `'/.../'`
    and `'|...|'` instead of plain `'...'`.
    hamishknight committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    128f5d4 View commit details
    Browse the repository at this point in the history