mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-23 14:23:41 +00:00
logcmd: Only strip quotes on single arg
This commit is contained in:
parent
db90d1a4c2
commit
398588ebb7
1 changed files with 9 additions and 6 deletions
|
@ -93,12 +93,15 @@ struct LogPass : public Pass {
|
||||||
if (push) { log_push(); return; }
|
if (push) { log_push(); return; }
|
||||||
if (pop) { log_pop(); return; }
|
if (pop) { log_pop(); return; }
|
||||||
|
|
||||||
for (; argidx < args.size(); argidx++)
|
text = args[argidx++];
|
||||||
text += args[argidx] + ' ';
|
if (argidx < args.size()) {
|
||||||
if (!text.empty()) text.resize(text.size()-1);
|
for (; argidx < args.size(); argidx++) {
|
||||||
|
text += ' ' + args[argidx];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (text.size() > 1 && text[0] == '"' && text[text.size()-1] == '"')
|
if (text.size() > 1 && text[0] == '"' && text[text.size()-1] == '"')
|
||||||
text = text.substr(1, text.size()-2);
|
text = text.substr(1, text.size()-2);
|
||||||
|
}
|
||||||
|
|
||||||
const char *fmtline = newline ? "%s\n" : "%s";
|
const char *fmtline = newline ? "%s\n" : "%s";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue