Skip to content

Validate a node's layout after it has been rewritten using the syntax rewriter #172

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
Nov 8, 2019

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Nov 7, 2019

Right now it is possible to generate invalid layouts using the SyntaxRewriter. This PR makes it impossible to create invalid layouts in debug builds. Release builds have the validation disabled for performance reasons.

@ahoppen ahoppen changed the title Validate a node's layout after it has been rewritten using the syntax rewriter WIP: Validate a node's layout after it has been rewritten using the syntax rewriter Nov 7, 2019
@ahoppen ahoppen force-pushed the validate-syntax-layout branch from 04337ac to e71fe57 Compare November 7, 2019 22:31
@ahoppen ahoppen force-pushed the validate-syntax-layout branch from e71fe57 to 8d347ae Compare November 7, 2019 23:18
@ahoppen ahoppen changed the title WIP: Validate a node's layout after it has been rewritten using the syntax rewriter Validate a node's layout after it has been rewritten using the syntax rewriter Nov 7, 2019
@ahoppen
Copy link
Member Author

ahoppen commented Nov 7, 2019

@swift-ci Please test

@ahoppen ahoppen force-pushed the validate-syntax-layout branch from 8d347ae to 097a252 Compare November 7, 2019 23:33
@ahoppen
Copy link
Member Author

ahoppen commented Nov 7, 2019

@swift-ci Please test

@swiftlang swiftlang deleted a comment from swift-ci Nov 7, 2019
… rewriter

Otherwise it is possible to generate invalid syntax trees using the syntax
rewriter.
@ahoppen ahoppen force-pushed the validate-syntax-layout branch from 097a252 to ab8d0de Compare November 8, 2019 00:25
@ahoppen
Copy link
Member Author

ahoppen commented Nov 8, 2019

@swift-ci Please test

@swiftlang swiftlang deleted a comment from swift-ci Nov 8, 2019
@ahoppen ahoppen merged commit d47cce9 into swiftlang:master Nov 8, 2019
@ahoppen ahoppen deleted the validate-syntax-layout branch November 8, 2019 00:58
adevress pushed a commit to adevress/swift-syntax that referenced this pull request Jan 14, 2024
Restrict doc-block to doc-line transform to first doc comment.
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