mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +00:00
Add comment annotation to disable copying redef value into docs
This commit is contained in:
parent
b1bb4e72c5
commit
55e458c5f7
7 changed files with 44 additions and 21 deletions
34
src/ID.cc
34
src/ID.cc
|
@ -536,21 +536,27 @@ void ID::DescribeReST(ODesc* d, bool roles_only) const {
|
|||
d->NL();
|
||||
d->PushIndent();
|
||||
|
||||
if ( ir->ic == INIT_FULL )
|
||||
d->Add("``=``");
|
||||
else if ( ir->ic == INIT_EXTRA )
|
||||
d->Add("``+=``");
|
||||
else if ( ir->ic == INIT_REMOVE )
|
||||
d->Add("``-=``");
|
||||
else
|
||||
assert(false);
|
||||
if ( ir->omit_value ) {
|
||||
d->Add("<< Value omitted due to ``@docs_omit_value`` annotation >>");
|
||||
d->NL();
|
||||
}
|
||||
else {
|
||||
if ( ir->ic == INIT_FULL )
|
||||
d->Add("``=``");
|
||||
else if ( ir->ic == INIT_EXTRA )
|
||||
d->Add("``+=``");
|
||||
else if ( ir->ic == INIT_REMOVE )
|
||||
d->Add("``-=``");
|
||||
else
|
||||
assert(false);
|
||||
|
||||
d->Add("::");
|
||||
d->NL();
|
||||
d->PushIndent();
|
||||
d->Add(redef_str.data());
|
||||
d->PopIndent();
|
||||
d->PopIndent();
|
||||
d->Add("::");
|
||||
d->NL();
|
||||
d->PushIndent();
|
||||
d->Add(redef_str.data());
|
||||
d->PopIndent();
|
||||
d->PopIndent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue