Skip to content

[libSyntax] Store range in token_data in C lib parse actions #36249

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
Mar 8, 2021

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Mar 3, 2021

We don't actually need the range for layout nodes, so just store it for token nodes. This will also make deferred node handling easier later on, because we don't need to keep track of layout node ranges.

The client of the C lib parse actions can still compute the total byte length of the node by adding the byte lengths of its children.

The corresponding changes to the C client in SwiftSyntax are being made in swiftlang/swift-syntax#260.

@ahoppen
Copy link
Member Author

ahoppen commented Mar 8, 2021

@swift-ci Please smoke test

@ahoppen
Copy link
Member Author

ahoppen commented Mar 8, 2021

swiftlang/swift-syntax#260

@swift-ci Please smoke test macOS

@swiftlang swiftlang deleted a comment from swift-ci Mar 8, 2021
@swiftlang swiftlang deleted a comment from swift-ci Mar 8, 2021
ahoppen added 2 commits March 8, 2021 18:40
We don't actually need the range for layout nodes, so just store it
for token nodes. This will also make deferred node handling easier
later on, because we don't need to keep track of layout node ranges.
@ahoppen ahoppen force-pushed the pr/range-in-token-data branch from bb6381d to 1e64023 Compare March 8, 2021 17:41
@ahoppen
Copy link
Member Author

ahoppen commented Mar 8, 2021

@swift-ci Please smoke test and merge

@ahoppen
Copy link
Member Author

ahoppen commented Mar 8, 2021

swiftlang/swift-syntax#260

@swift-ci Please smoke test macOS

@rintaro rintaro merged commit 682f3a7 into swiftlang:main Mar 8, 2021
@ahoppen ahoppen deleted the pr/range-in-token-data branch March 9, 2021 08:48
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