mirror of https://github.com/zachjs/sv2v.git
normalize trailing whitespace in escaped identifiers
This commit is contained in:
parent
9aa8b7033e
commit
91e3ac0fb1
|
|
@ -498,6 +498,11 @@ postProcess stack (Token Dir_end_keywords _ pos : ts) =
|
|||
case stack of
|
||||
(_ : stack') -> postProcess stack' ts
|
||||
[] -> throwError $ show pos ++ ": unmatched end_keywords"
|
||||
postProcess stack (Token Id_escaped str pos : ts) =
|
||||
postProcess stack ts >>= return . (t' :)
|
||||
where
|
||||
t' = Token Id_escaped str' pos
|
||||
str' = (++ " ") $ init str
|
||||
postProcess [] (t : ts) = do
|
||||
ts' <- postProcess [] ts
|
||||
return $ t : ts'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
module mod(
|
||||
input \AFancySignalName[3].Something ,
|
||||
output \AFancySignalName[3].SomethingElse
|
||||
);
|
||||
endmodule
|
||||
|
||||
module top;
|
||||
wire \BFancySignalName.Something = 1;
|
||||
wire \BFancySignalName.SomethingElse ;
|
||||
mod inst_of_fancy_module(
|
||||
.\AFancySignalName[3].Something (\BFancySignalName.Something ),
|
||||
.\AFancySignalName[3].SomethingElse (\BFancySignalName.SomethingElse )
|
||||
);
|
||||
endmodule
|
||||
Loading…
Reference in New Issue