Skip to content

Add SymbolRelation class with roles and symbols #30

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
Jul 16, 2019

Conversation

literalpie
Copy link
Contributor

Add kind property to Symbol

Add forEachRelation of occurrence function

Based on discussions in workspace/symbol PR in apple/sourcekit-lsp.

Copy link
Contributor Author

@literalpie literalpie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By using these changes with sourcekit-lsp, I am able to get the containerName of symbols and incorrect SymbolKind values.

Copy link
Contributor

@benlangmuir benlangmuir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking pretty good. Thanks for working on this! Specific feedback inline.

Copy link
Contributor Author

@literalpie literalpie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can see how this looks from the SourceKit-LSP side in my branch here

public final class SymbolRelation {
let value: indexstoredb_symbol_relation_t

public lazy var roles = SymbolRole(rawValue: indexstoredb_symbol_relation_get_roles(value))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add type annotations (: SymbolRole) to any class/struct properties. It makes the API more explicit and can improve compile times.

@benlangmuir
Copy link
Contributor

Thanks! I think the type annotation for public lazy var roles is the only review comment not addressed at this point.

Add IndexSymbolKind enum

Add kind property in Symbol

Add forEachRelation of occurrence function
@benlangmuir
Copy link
Contributor

@swift-ci please test

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