Thanks for this wonderful parser + API. I am trying to use the Python API to write some simple lint rule. Say we want to count the number of lines of actual code vs. comments (ideally get rid of blank lines). I read that comments are kept in a separate array, but not clear where. Below is what I have (from provided examples):
// code
parser = verible_verilog_syntax.VeribleVerilogSyntax()
data = parser.parse_files(af_ip_f, options={"gen_tree": True})
for file_path, file_data in data.items():
print (file_data.tree.text)
// code ends
Now, how do I get comments (multiline, single line, ideally even in-line ones) as separate?
Thanks
Srini