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

[libSyntax][SourceKit] Integrating libSyntax representation of a source file with several SourceKitd syntax request.s #14000

Merged
merged 4 commits into from
Jan 18, 2018

Conversation

nkcsgexi
Copy link
Member

The enhanced SourceKitd requests are EditorOpen and EdtiorReplaceText. In these two requests, the clients can specify a flag "key. enablesyntaxtree = 1" to get a serialize libSyntax tree with the response.

To help this integration, we added a function in SyntaxParsingContext to explicitly finalize the creation of a SourceFileSyntax to incorporate the fact that SourceKit needs the tree before its destroying the parser instance.

To test this integration, we diff the syntax tree serialized from the frontend action and the tree serialized from a SourceKitd response. They should be identical.

@nkcsgexi
Copy link
Member Author

@swift-ci please smoke test

@nkcsgexi
Copy link
Member Author

@swift-ci Please clean test Linux platform

@nkcsgexi nkcsgexi merged commit 4c17203 into apple:master Jan 18, 2018
@nkcsgexi nkcsgexi deleted the lib-syntax-sourcekit branch January 18, 2018 05:13
@harlanhaskins
Copy link
Collaborator

This is awesome! 😄

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.

None yet

2 participants