-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Parser] Decouple the parser from AST creation (part 2) #26478
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
[Parser] Decouple the parser from AST creation (part 2) #26478
Conversation
@swift-ci Please test |
Build failed |
Build failed |
@swift-ci Please test |
Build failed |
Build failed |
@swift-ci Please test |
@jansvoboda11 I found that parsing the following source causes memory leak. var foo: Bar<Baz, Tested with (in Linux)
Could you look into it? It seems that the parsed |
Build failed |
Other leaking cases: var foo: Bar< let foo: Bar[{} let foo: Bar & |
@swift-ci Please test |
Build failed |
Build failed |
Instead of creating the AST directly in the parser (and libSyntax or SwiftSyntax via SyntaxParsingContext), make Parser to explicitly create a tree of ParsedSyntaxNodes. Their OpaqueSyntaxNodes can be either libSyntax or SwiftSyntax. If AST is needed, it can be generated from the libSyntax tree.
Linux failure is unrelated |
Working on in right now. |
@swift-ci Please test |
Build failed |
Build failed |
@swift-ci Please test |
Build failed |
Build failed |
Instead of creating the AST directly in the parser (and libSyntax or SwiftSyntax via SyntaxParsingContext), make Parser to explicitly create a tree of ParsedSyntaxNodes. Their OpaqueSyntaxNodes can be either libSyntax or SwiftSyntax. If AST is needed, it can be generated from the libSyntax tree.
This PR contains refactored type parsing.
This PR is a part of a Google Summer of Code 2019 project.