mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Autodoc framework now tracks script constants
Also, it's starting to attempt to describe more complex types of initial values.
This commit is contained in:
parent
2490878656
commit
60a7dc6f55
6 changed files with 77 additions and 28 deletions
22
src/ID.cc
22
src/ID.cc
|
@ -651,12 +651,26 @@ void ID::DescribeReST(ODesc* d, bool is_role) const
|
|||
}
|
||||
|
||||
if ( val && type &&
|
||||
type->InternalType() != TYPE_INTERNAL_OTHER &&
|
||||
type->Tag() != TYPE_FUNC &&
|
||||
type->InternalType() != TYPE_INTERNAL_VOID )
|
||||
{
|
||||
d->Add(":Init: ");
|
||||
val->DescribeReST(d);
|
||||
d->NL();
|
||||
if ( type->InternalType() == TYPE_INTERNAL_OTHER )
|
||||
{
|
||||
d->Add(":Init:");
|
||||
d->NL();
|
||||
d->NL();
|
||||
d->Add("::");
|
||||
d->NL();
|
||||
d->PushIndent();
|
||||
val->DescribeReST(d);
|
||||
d->PopIndent();
|
||||
}
|
||||
else
|
||||
{
|
||||
d->Add(":Init: ");
|
||||
val->DescribeReST(d);
|
||||
d->NL();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue