Skip to content

Multiple improvements to SwiftSyntaxComparison #562

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 3 commits into from
Aug 8, 2022

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Aug 8, 2022

  • Remove dependency from _SwiftSyntaxTestSupport on SyntaxParser.parse
    • This required moving SyntaxComparisonTests.swift from SwiftSyntaxTest to SwiftSyntaxParserTest because SwiftSyntaxTest no longer has a dependency on the parser (which it shouldn’t have IMO)
  • Print children for "Could not find subtree after UTF8 offset" syntax comparison error message
  • Add XCTAssert* methods to make sure a tree has a certain subtree

This allows us to invoke the parser more flexibly to, e.g. only parse subtrees.
@ahoppen ahoppen requested a review from bnbarham August 8, 2022 07:32
@ahoppen ahoppen force-pushed the pr/syntax-comparison-improvements branch from e8e46b2 to b8f3907 Compare August 8, 2022 07:58
@ahoppen
Copy link
Member Author

ahoppen commented Aug 8, 2022

@swift-ci Please test

@ahoppen ahoppen merged commit 4bb7761 into swiftlang:main Aug 8, 2022
@ahoppen ahoppen deleted the pr/syntax-comparison-improvements branch August 8, 2022 16:08
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