mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Generated script docs now have a new summary section.
It's a table listing all the identifiers in the script's public interface and an optional, brief (one-sentence) description of each.
This commit is contained in:
parent
cf45ae19e1
commit
2d17ca0942
6 changed files with 270 additions and 52 deletions
27
src/ID.cc
27
src/ID.cc
|
@ -607,6 +607,33 @@ void ID::DescribeExtended(ODesc* d) const
|
|||
}
|
||||
}
|
||||
|
||||
void ID::DescribeReSTShort(ODesc* d) const
|
||||
{
|
||||
if ( is_type )
|
||||
d->Add(":bro:type:`");
|
||||
else
|
||||
d->Add(":bro:id:`");
|
||||
d->Add(name);
|
||||
d->Add("`");
|
||||
|
||||
if ( type )
|
||||
{
|
||||
d->Add(": ");
|
||||
d->Add(":bro:type:`");
|
||||
if ( ! is_type && type->GetTypeID() )
|
||||
d->Add(type->GetTypeID());
|
||||
else
|
||||
d->Add(type_name(type->Tag()));
|
||||
d->Add("`");
|
||||
}
|
||||
|
||||
if ( attrs )
|
||||
{
|
||||
d->SP();
|
||||
attrs->DescribeReST(d);
|
||||
}
|
||||
}
|
||||
|
||||
void ID::DescribeReST(ODesc* d, bool is_role) const
|
||||
{
|
||||
if ( is_role )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue