Closed dawpud closed 2 months ago
Just for the input, the following patch solves the issue;
diff --git a/parsers/verilog.c b/parsers/verilog.c
index 0b107687b..e7555eb60 100644
--- a/parsers/verilog.c
+++ b/parsers/verilog.c
@@ -1612,6 +1612,7 @@ static int pushEnumNames (tokenInfo* token, int c)
if (c == '{')
{
c = skipWhite (vGetc ());
+ c = skipMacro (c, token);
while (c != '}' && c != EOF)
{
if (!isWordToken (c))
However, my change may not work well if you move the include directive elsewhere. I guess directives must eventually be handled in one more lower layer.
Let's see what the parser maintainer says. If I don't hear back within two weeks, I will make a pull request based on the above change.
I'll take a look at this. Give me some time.
I sent #4058 fixing this bug.
Your fix was very close. SkipMacro()
should be in the while-loop.
The current implementation of the Verilog parser's compiler directives is very ad-hoc.
Anything other than `define
is simply ignored.
I guess directives must eventually be handled in one more lower layer.
As we discussed before, this would be the best solution,
The fix was merged.
@dawpud Thank you for your report.
The name of the parser: SystemVerilog
The command line you used to run ctags:
The content of input file:
The tags output you are not satisfied with:
The tags output you expect:
The version of ctags:
How do you get ctags binary:
Unix binary from nightly builds: uctags-2023.12.29-linux-x86_64.tar.xz
As seen in the results above, as soon as the `include macro is used within the typedef enum, the rest of the enum values stop getting parsed, and the enum itself is not listed in the output tags file. I appreciate any help you can provide! Thank you very much!