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

tagmanager: (System)Verilog: don't tag module of instances #4075

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

cousteaulecommandant
Copy link
Contributor

Fixes #4072 (re: my_module inst (d, q); creating tags for both the instance inst and the module my_module).
The unit tests have been updated accordingly.

Also includes a minor amendment to #4039 to fix the tag grouping for SystemVerilog so that enum objects are put in the same group as struct/union objects, which makes more sense than putting them in the same group as typedefs (which are types, not objects).

Unlike in the C parser, "struct" in SystemVerilog refers to declarations
of struct/union *objects*, not definitions of struct/union "types".
The same goes for enum declarations.

Unlike in C, there is no way to define a "struct type" (or union/enum)
except by using a typedef.  Therefore, all "structure definitions" use
typedef; otherwise they're simply declaring struct objects.

This puts the ctags "struct" and "enum" in the same category as "net" or
"register"; the tm_parser should reflect this.

- Put Enums on the same tm_parser group as Structs and Unions, separate
  from Typedefs.
- Change the icon for the Structs/Unions/Enums to "three gray boxes"
  (OTHER), so that it resembles an "aggregate of multiple signals" or
  "a grayed-out (anonymous/signal-ified) type".
Currently, for a Verilog line like `a_module inst (clk, d, q);`,
ctags will emit both an "instance" tag and a "module" reference,
which Geany incorrectly interprets as a module definition.

Disable ctags roles for Verilog (and SystemVerilog) modules to prevent
this.
@techee techee merged commit 0e5a873 into geany:master Nov 25, 2024
7 checks passed
@b4n b4n added this to the 2.1 milestone Nov 25, 2024
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.

tagmanager: Verilog: module instantiation also creates module declaration
3 participants