Skip to content

Enhancements to classification mechanism #109

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
Mar 10, 2019

Conversation

akyrtzi
Copy link
Contributor

@akyrtzi akyrtzi commented Mar 10, 2019

  • Add some convenience APIs for getting the classification at a certain offset
  • Provided classification ranges that are consecutive and cover the full source text of the node, including none classifications.
  • Add API TokenSyntax.tokenClassification to get the classification for a specific token

akyrtzi added 3 commits March 9, 2019 13:04
…ifier provides

The provided classification ranges are consecutive and cover the full source text of the node, including `none` classifications.
The ranges may also span multiple tokens, if multiple consecutive tokens would have the same classification then a single classified range is provided for all of them.

This simplifies clients of classifications (e.g. `ClassifiedSyntaxTreePrinter`)
@akyrtzi
Copy link
Contributor Author

akyrtzi commented Mar 10, 2019

@swift-ci Please test

@akyrtzi akyrtzi merged commit c49eb29 into swiftlang:master Mar 10, 2019
@akyrtzi akyrtzi deleted the classification-enhancements branch March 10, 2019 22:47
adevress pushed a commit to adevress/swift-syntax that referenced this pull request Jan 14, 2024
Replace enable/disable directives with ignore for formatter rules.
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.

1 participant