dalance / sv-parser

SystemVerilog parser library fully compliant with IEEE 1800-2017
Other
396 stars 52 forks source link

Remove whitespace within/around compiler directives (bugfix). #58

Closed DaveMcEwan closed 2 years ago

DaveMcEwan commented 2 years ago

Found issue when using the svlint's rule style_indent with `default_nettype none. The function preprocess() was pushing the space(s) between default_nettype and none plus any whitespace at the end of the line, after pushing the whole directive to ret. This PR adds a 1b FSM (skip_whitespace) which controls whether WhiteSpace nodes are pushed to ret.

dalance commented 2 years ago

LGTM Thanks!