Commit 91e3ac0f by Zachary Snow

normalize trailing whitespace in escaped identifiers

parent 9aa8b703
...@@ -498,6 +498,11 @@ postProcess stack (Token Dir_end_keywords _ pos : ts) = ...@@ -498,6 +498,11 @@ postProcess stack (Token Dir_end_keywords _ pos : ts) =
case stack of case stack of
(_ : stack') -> postProcess stack' ts (_ : stack') -> postProcess stack' ts
[] -> throwError $ show pos ++ ": unmatched end_keywords" [] -> 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 postProcess [] (t : ts) = do
ts' <- postProcess [] ts ts' <- postProcess [] ts
return $ t : ts' return $ t : ts'
......
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment