Skip to content

[libSyntax] Support serializing the syntax tree as ByteTree #18690

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
merged 1 commit into from
Aug 14, 2018

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Aug 14, 2018

This PR hooks the ByteTree serializer up in SourceKit so that a ByteTree serialized syntax tree can actually be retrieved.

@ahoppen ahoppen requested review from rintaro and nkcsgexi August 14, 2018 00:18
@ahoppen
Copy link
Member Author

ahoppen commented Aug 14, 2018

@swift-ci Please smoke test

@@ -462,6 +480,8 @@ void handleRequestImpl(sourcekitd_object_t ReqObj, ResponseReceiver Rec) {
Opts.EnableStructure = EnableStructure;
Opts.EnableDiagnostics = EnableDiagnostics;
Opts.SyntaxTransferMode = syntaxTransferModeFromUID(TransferModeUID);
Opts.SyntaxSerializationFormat =
syntaxSerializationFormatFromUID(SerializationFormatUID);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and syntaxTransferModeFromUID should return Optional, and return error response for invalid UID.

@ahoppen ahoppen force-pushed the syntax-tree-as-bytetree branch from fe7cd69 to 4cda5cb Compare August 14, 2018 03:04
@ahoppen
Copy link
Member Author

ahoppen commented Aug 14, 2018

@swift-ci Please smoke test

@ahoppen ahoppen merged commit d962c83 into swiftlang:master Aug 14, 2018
@ahoppen ahoppen deleted the syntax-tree-as-bytetree branch August 14, 2018 18:24
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