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

[SourceKit] Introduce "source.lang.swift.expr.tuple" (SR-5977) #12089

Merged
merged 1 commit into from Sep 27, 2017

Conversation

marcelofabri
Copy link
Contributor

@marcelofabri marcelofabri commented Sep 25, 2017

This PR introduces source.lang.swift.expr.tuple to represent tuple expressions, similar to source.lang.swift.expr.array and source.lang.swift.expr.dictionary.

Currently this only works for tuple expressions (i.e. it won't report a tuple in types as let x: (Y, Z)). However, probably this is the expected behavior for expression kinds anyway.

This also doesn't provide any extra information for named tuples, but I think this can be done later.

Resolves SR-5977.

// cc @nkcsgexi

Tup->getSourceRange());

for (auto *Elem : Tup->getElements()) {
if (auto *TupleE = dyn_cast<TupleExpr>(Elem)) {
Copy link
Member

Choose a reason for hiding this comment

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

Why do we only care about the second level as a tuple and why do we flatten it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because I copied and pasted from somewhere else 😅

Fixed!

@nkcsgexi
Copy link
Member

@swift-ci please smoke test

@marcelofabri
Copy link
Contributor Author

The CI failure seems unrelated.

@nkcsgexi
Copy link
Member

@swift-ci please smoke test

@nkcsgexi
Copy link
Member

@swift-ci Please clean smoke test Linux platform

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