Skip to content
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

Feat: Go to definition for symbols in string content using tree-sitter #20

Conversation

WilsonZiweiWang
Copy link
Contributor

Words in the string content are extracted when they are recipe names. Definitions are then created according to these extracted symbols.
e.g. efivar, popt and git in the following screenshots:
image
image

Extra definitions are also provided when they have appends (based on bitbake scan results)

@WilsonZiweiWang WilsonZiweiWang self-assigned this Dec 4, 2023
@WilsonZiweiWang WilsonZiweiWang added the enhancement New feature or request label Dec 4, 2023
@deribaucourt
Copy link
Member

Words in the string content are extracted when they are recipe names. Definitions are then created according to these extracted symbols. e.g. efivar, popt and git in the following screenshots: image image

Extra definitions are also provided when they have appends (based on bitbake scan results)

git here does not refer to the git recipe. However I don't think tree-sitter can difference regular strings from package names so this is acceptable in order to have this feature.

@WilsonZiweiWang
Copy link
Contributor Author

git here does not refer to the git recipe. However I don't think tree-sitter can difference regular strings from package names so this is acceptable in order to have this feature.

Current tree-sitter doesn't interpret string content at all. It gives all string content the type string_content.

@WilsonZiweiWang WilsonZiweiWang merged commit bed35b5 into yoctoproject:staging Dec 5, 2023
1 check passed
@WilsonZiweiWang WilsonZiweiWang deleted the Feature-10428-definition-symbols-in-string-content branch December 5, 2023 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants