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

extend goto/implementation to find architectures of entities #230

Merged

Conversation

kernmatthias
Copy link
Contributor

Hi, I've extended the find_implementation function to also search for architectures which implement an entity.

update the find_implementation function to also search for architectures
if the base designator is an entity
AnyEntKind::Design(Design::Architecture(a)) => {
matches!(
a.designator(),
Designator::Identifier(ent_ident) if ent_ident == ident
Copy link
Member

Choose a reason for hiding this comment

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

For the entity/architecture pair we can compare the id instead of comparing the names:

AnyEntKind::Design(Design::Architecture(ent_of_arch)) => ent_of_arch== ent,  

Comparing the id:s is faster and more precise even though entities are guaranteed to have unique names within a library.

compare entity and entity of the architecture by their ids
@kraigher
Copy link
Member

Looks good, you just forgot to run cargo fmt

@kernmatthias
Copy link
Contributor Author

Thank you for your review!

@kraigher kraigher merged commit aac4c7e into VHDL-LS:master Nov 29, 2023
8 checks passed
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