mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Bro doc mode now tracks record redefs that extend its field list.
This commit is contained in:
parent
aec63df90f
commit
cf0a542f7c
5 changed files with 142 additions and 6 deletions
|
@ -65,9 +65,11 @@ Functions
|
|||
|
||||
Redefinitions
|
||||
#############
|
||||
================================================= ====================================
|
||||
:bro:type:`Example::SimpleEnum`: :bro:type:`enum` document the "SimpleEnum" redef here
|
||||
================================================= ====================================
|
||||
===================================================== ========================================
|
||||
:bro:type:`Example::SimpleEnum`: :bro:type:`enum` document the "SimpleEnum" redef here
|
||||
|
||||
:bro:type:`Example::SimpleRecord`: :bro:type:`record` document the record extension redef here
|
||||
===================================================== ========================================
|
||||
|
||||
Namespaces
|
||||
~~~~~~~~~~
|
||||
|
@ -227,6 +229,16 @@ Redefinitions
|
|||
|
||||
document the "SimpleEnum" redef here
|
||||
|
||||
.. bro:type:: Example::SimpleRecord
|
||||
|
||||
:Type: :bro:type:`record`
|
||||
|
||||
field_ext: :bro:type:`string` :bro:attr:`&optional`
|
||||
document the extending field here
|
||||
(or here)
|
||||
|
||||
document the record extension redef here
|
||||
|
||||
Port Analysis
|
||||
-------------
|
||||
:ref:`More Information <common_port_analysis_doc>`
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
.. Automatically generated. Do not edit.
|
||||
|
||||
autogen-reST-record-add.bro
|
||||
===========================
|
||||
|
||||
:download:`Original Source File <autogen-reST-record-add.bro>`
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
|
||||
Summary
|
||||
~~~~~~~
|
||||
State Variables
|
||||
###############
|
||||
===================================== =
|
||||
:bro:id:`a`: :bro:type:`my_record`
|
||||
|
||||
:bro:id:`b`: :bro:type:`super_record`
|
||||
===================================== =
|
||||
|
||||
Types
|
||||
#####
|
||||
============================================ =
|
||||
:bro:type:`my_record`: :bro:type:`record`
|
||||
|
||||
:bro:type:`super_record`: :bro:type:`record`
|
||||
============================================ =
|
||||
|
||||
Functions
|
||||
#########
|
||||
===================================== =
|
||||
:bro:id:`test_func`: :bro:type:`func`
|
||||
===================================== =
|
||||
|
||||
Redefinitions
|
||||
#############
|
||||
========================================= =
|
||||
:bro:type:`my_record`: :bro:type:`record`
|
||||
========================================= =
|
||||
|
||||
Public Interface
|
||||
----------------
|
||||
State Variables
|
||||
~~~~~~~~~~~~~~~
|
||||
.. bro:id:: a
|
||||
|
||||
:Type: :bro:type:`my_record`
|
||||
:Default:
|
||||
|
||||
::
|
||||
|
||||
{
|
||||
field1=<uninitialized>
|
||||
field2=<uninitialized>
|
||||
field3=<uninitialized>
|
||||
}
|
||||
|
||||
.. bro:id:: b
|
||||
|
||||
:Type: :bro:type:`super_record`
|
||||
:Default:
|
||||
|
||||
::
|
||||
|
||||
{
|
||||
rec=[field1=<uninitialized>, field2=<uninitialized>, field3=<uninitialized>]
|
||||
}
|
||||
|
||||
Types
|
||||
~~~~~
|
||||
.. bro:type:: my_record
|
||||
|
||||
:Type: :bro:type:`record`
|
||||
|
||||
field1: :bro:type:`bool`
|
||||
|
||||
field2: :bro:type:`string`
|
||||
|
||||
.. bro:type:: super_record
|
||||
|
||||
:Type: :bro:type:`record`
|
||||
|
||||
rec: :bro:type:`my_record`
|
||||
|
||||
Functions
|
||||
~~~~~~~~~
|
||||
.. bro:id:: test_func
|
||||
|
||||
:Type: :bro:type:`function` () : :bro:type:`void`
|
||||
|
||||
Redefinitions
|
||||
~~~~~~~~~~~~~
|
||||
.. bro:type:: my_record
|
||||
|
||||
:Type: :bro:type:`record`
|
||||
|
||||
field3: :bro:type:`count` :bro:attr:`&optional`
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
# @TEST-EXEC: bro --doc-scripts %INPUT
|
||||
# @TEST-EXEC: btest-diff autogen-reST-record-add.rst
|
||||
|
||||
# When in doc mode, bro will clone declared types (see add_type() in Var.cc)
|
||||
# in order to keep track of the identifier name associated with the new type.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue