automatically comment preprocessor conditionals #2171
Labels
enhancement
New feature or request
good first issue
Good for newcomers
preprocessor
anything related to preprocessing (conditionals, macros, etc.)
style-linter
Verilog style-linter issues
Summary
This request captures features from a script that lived outside of Verible, but some developers found useful.
The script (by @jonmayergoogle ) would automatically add comments after
ifdef
elsif
else
endif
directives that reflected the condition under which the section was active, and served as a readability aid.Test cases and examples
would automatically become annotated like:
Proposal
The implementation for this would be based on an unpreprocessed token stream. No syntactic validation is needed, as this is purely a transformation based on preprocessing tokens. The simplicity of this task means that we don't need a full syntax tree transformation/rewriting framework.
Additional context
cl/629042737 (Google)
The text was updated successfully, but these errors were encountered: