fmt: Handle free-standing time arguments

This commit is contained in:
Martin Povišer 2023-11-20 17:25:09 +01:00
parent 032fab1f54
commit 282ce24eec
1 changed files with 10 additions and 0 deletions

View File

@ -326,6 +326,16 @@ void Fmt::parse_verilog(const std::vector<VerilogFmtArg> &args, bool sformat_lik
break;
}
case VerilogFmtArg::TIME: {
FmtPart part = {};
part.type = FmtPart::TIME;
part.realtime = arg->realtime;
part.padding = ' ';
part.width = 20;
parts.push_back(part);
break;
}
case VerilogFmtArg::STRING: {
if (arg == args.begin() || !sformat_like) {
const auto fmtarg = arg;