Skip to content

Dump semantic expressions in AST consistently #16778

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 2 commits into from
May 23, 2018
Merged

Dump semantic expressions in AST consistently #16778

merged 2 commits into from
May 23, 2018

Conversation

beccadax
Copy link
Contributor

Previously, ASTDumper ignored semanticExprs in most expression nodes, except for DictionaryExpr, where it entirely replaced the normal nodes. This PR changes the situation so that all nodes with a semanticExpr will include it after the other child nodes in a separate (semantic_expr) list.

If we'd prefer to hide the other child nodes when a semanticExpr is present, we should probably include some sort of flag in the first line indicating that the child is the semantic expression, not the normal content.

beccadax added 2 commits May 22, 2018 14:14
Previously, only DictionaryExpr dumped its semanticExpr, and it replaced the direct contents. With this change, all nodes with a semanticExpr dump it, and they all handle it in the same way: they append it to the end of the list of children, in a separate S-expression marked by “semantic_expr”.
@DougGregor
Copy link
Member

@swift-ci please smoke test

@DougGregor DougGregor merged commit 147e6e9 into swiftlang:master May 23, 2018
@beccadax beccadax deleted the semantic-expr-dump branch May 23, 2018 23:45
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.

2 participants