Merge pull request #4040 from povik/fmt-time

fmt: Handle free-standing time arguments
This commit is contained in:
Martin Povišer 2023-11-20 18:11:24 +01:00 committed by GitHub
commit 34f851f132
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;