Skip to content

[SwiftSyntax] Parse regex literals using a fallback lexer implemented in C++ #58997

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

Merged

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented May 20, 2022

libInternalSwiftSyntaxParser.dylib currently doesn’t link against SwiftExperimentalStringProcessing, so it can’t use the regex lexing functions defined within. This caused SwiftSyntax to fail if the source code contained regex literals.

Implement a fallback regex lexing function in C++ and use it for SwiftSyntax parsing.

rdar://93580240

@ahoppen ahoppen requested a review from rintaro May 20, 2022 10:53
@ahoppen
Copy link
Member Author

ahoppen commented May 20, 2022

@swift-ci Please smoke test

… in C++

`libInternalSwiftSyntaxParser.dylib` currently doesn’t link against `SwiftExperimentalStringProcessing`, so it can’t use the regex lexing functions defined within. This caused SwiftSyntax to fail if the source code contained regex literals.

Implement a fallback regex lexing function in C++ and use it for SwiftSyntax parsing.

rdar://93580240

Co-authored-by: Rintaro Ishizaki <[email protected]>
@ahoppen ahoppen force-pushed the pr/regex-literal-parsing-swiftsyntax branch from 2cd9ab4 to 1d750f9 Compare May 20, 2022 17:47
@ahoppen
Copy link
Member Author

ahoppen commented May 20, 2022

@swift-ci Please smoke test

@ahoppen ahoppen merged commit 3ee8034 into swiftlang:main May 23, 2022
@ahoppen ahoppen deleted the pr/regex-literal-parsing-swiftsyntax branch May 23, 2022 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants