fix preprocessing of line comments not preceded by whitespace

This commit is contained in:
Zachary Snow 2021-09-13 20:46:59 -04:00
parent 8ecd2c6e52
commit e169c907f4
3 changed files with 10 additions and 0 deletions

View File

@ -26,6 +26,8 @@
files encoding using Latin-1 with special characters in comments
* Support for non-ANSI style port declarations where the port declaration is
separate from the corresponding net or variable declaration
* Fix preprocessing of line comments which are neither preceded nor followed by
whitespace except for the newline which terminates the comment
## v0.0.8

View File

@ -951,4 +951,7 @@ removeThrough pattern = do
let chars = patternIdx + length pattern
let (dropped, rest) = splitAt chars str
advancePositions dropped
when (pattern == "\n") $ do
pos <- getPosition
pushChar '\n' pos
setInput rest

View File

@ -0,0 +1,5 @@
module top;
initial begin
$display("Hi!");
end//comment
endmodule