mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 20:18:20 +00:00
better descriptions for named record constructors
This commit is contained in:
parent
a6480e5eec
commit
7a96d2fa61
10 changed files with 772 additions and 760 deletions
18
src/Expr.cc
18
src/Expr.cc
|
@ -3375,9 +3375,21 @@ bool RecordConstructorExpr::IsPure() const
|
|||
|
||||
void RecordConstructorExpr::ExprDescribe(ODesc* d) const
|
||||
{
|
||||
d->Add("[");
|
||||
op->Describe(d);
|
||||
d->Add("]");
|
||||
auto& tn = type->GetName();
|
||||
|
||||
if ( tn.size() > 0 )
|
||||
{
|
||||
d->Add(tn);
|
||||
d->Add("(");
|
||||
op->Describe(d);
|
||||
d->Add(")");
|
||||
}
|
||||
else
|
||||
{
|
||||
d->Add("[");
|
||||
op->Describe(d);
|
||||
d->Add("]");
|
||||
}
|
||||
}
|
||||
|
||||
TraversalCode RecordConstructorExpr::Traverse(TraversalCallback* cb) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue