From d0cb919bdbb88ec3dbfcd96d77432dc7647a77c3 Mon Sep 17 00:00:00 2001 From: nick Date: Fri, 2 Oct 2026 13:07:18 -0600 Subject: [PATCH] read_verilog: fix spaces in macros being deleted --- frontends/verilog/preproc.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontends/verilog/preproc.cc b/frontends/verilog/preproc.cc index e729f0b0c..f8137ac2d 100644 --- a/frontends/verilog/preproc.cc +++ b/frontends/verilog/preproc.cc @@ -452,9 +452,13 @@ static void input_file(std::istream &f, std::string filename) // the argument list); false if we finished with ','. static bool read_argument(std::string &dest) { + skip_spaces(true); std::vector openers; for (;;) { - skip_spaces(true); + std::string skipped = skip_spaces(true); + if (skipped != "") { + dest += " "; + } std::string tok = next_token(true); if (tok == ")") { if (openers.empty()) {