Rename existing tests with descriptive names, e.g. "test1" -> "ifdef_undefined".
The diff looks awful, so please have a look through testcases/*.sv and testcases/expected/*.sv
to see the proposed testing regime.
Put expected results into separate files.
This makes it easier to update tests without worrying about breaking checks on trailing whitespace
because lots of people (including me) have their editor setup to strip that on write.
Fix bugs with extraneous whitespace from text macro expansion.
This is basically ppWhitespace done more thoroughly - sorry for the partial work!
Leading spaces/tabs should not be included in output, but a line continuation can start whitespace
to be included.
Whitespace attached to the macro usage node should be output, rather than outputting a fixed 1 or
2 spaces.
Fix bugs around __FILE__ and __LINE__.
A well-known vendor tests if these are defined, presumably for backward compatibility.
The fix treats them as always defined, and prevents parse error when an unevaluated define sets them.
Fix bugs with undef,undefineall being removed from output where defines are left in.
Allow closure of #48 (copy of https://github.com/dalance/svlint/issues/77).
The reported testcases can be interpreted to be out-of-spec, because the quotes are expanded first.
See IEEE1800-2017 page 680, two paragraphs.
Protect against infinite include recursion.
Raise an Err(ExceedRecursiveLimit) instead of stack overflow.
This adds a new argument include_depth to preprocess_str(), breaking backwards compatibility.
This is already quite a large PR, so I'd like to leave fixes for #9 and #57 for a separate one.
The changes in this PR are:
testcases/*.sv
andtestcases/expected/*.sv
to see the proposed testing regime.__FILE__
and__LINE__
. A well-known vendor tests if these are defined, presumably for backward compatibility. The fix treats them as always defined, and prevents parse error when an unevaluated define sets them.Err(ExceedRecursiveLimit)
instead of stack overflow. This adds a new argumentinclude_depth
topreprocess_str()
, breaking backwards compatibility.This is already quite a large PR, so I'd like to leave fixes for #9 and #57 for a separate one.