Without this patch, a stray `endif caused sv2v to take the tail of an
empty list. Now we raise a lexical error.
To do this, the patch pulls the "push" and "pop" logic for the
preprocessor condition stack into separate helper
functions (pushCondStack and popCondStack). It also defines some
helper functions for manipulating Cond's.
The patch also adds a documentation comment explaining what the
different values of Code meant (because I had to squint to work it
out).
Yosys does support some asserts nowadays. Allowing sv2v to not strip
them out means that you can check formal properties without needing
hierarchical references (which Yosys really doesn't cope well with!)
- explicit enum casts in source are converted to size casts
- conversion for basic pattern array literals of unsized numbers
- unsized number array literals preserve signing
- more aggressive ternary simplification
- the ternary expressions were previously used to decide the direction
of generated part selects
- this fixes an issue where ternaries were generated for LHSs
- struct conversion handles directionality of fields
- struct conversion supports minus part selects
- fixed incorrect handling of directional part selects in multi-packed
conversion
- multi-packed conversion defines standard ranges in terms of
directional part selects for clarity
- fixed potential loop due to overeager untagging in multi-packed
conversion
- adds support for using macros and macro arguments within the argument
list to other macros
- fixes an issue where macros with arguments would have extraneous
whitespace
- fixes handling of multiline string literals