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

Support "Go to definition" and "Go to declaration" #58

Open
SeanMcLoughlin opened this issue Mar 6, 2021 · 3 comments
Open

Support "Go to definition" and "Go to declaration" #58

SeanMcLoughlin opened this issue Mar 6, 2021 · 3 comments

Comments

@SeanMcLoughlin
Copy link

I see that the goto_definition and goto_declaration methods for the LanguageServer trait are not implemented in the SVLS backend. So "go to definition" and "go to declaration" in the VSCode extension will not work.

Has there been any work on this? I can contribute to this if sv-parser provides enough info to support this feature. I'm reading up on this to see what work would need to be done to implement this. It's probably the one feature preventing me from switching from DVT to VSCode for SystemVerilog development full-time.

@SeanMcLoughlin
Copy link
Author

I think something needs to take the AST from sv-parser and convert it into a symbol table. As far as I can tell, this isn't done yet in sv-parser.

The symbol table can hold the locations in each file for each symbol. From there, the symbol table needs to be searched to find matching definitions or declarations.

Not sure if this is something that'd make sense to be in sv-parser, or if it should be in another crate (i.e. sv-symbol-table) that depends on sv-parser.

@dalance
Copy link
Owner

dalance commented Mar 7, 2021

I think the symbol table creation should be in another crate because sv-parser is parsing library to provide AST.
I want to work on it, but I don't have enough time now.

@SeanMcLoughlin
Copy link
Author

Okay. I'll try to look into adding this crate to sv-parser.

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

No branches or pull requests

2 participants