blark.sphinxdomain.BlarkDomain
- class blark.sphinxdomain.BlarkDomain(env: BuildEnvironment)[source]
Bases:
Domain
Blark IEC61131-3 language domain.
Methods
clear_doc
(docname)Remove traces of a document in the domain-specific inventories.
find_obj
(rolename, node, targetstring)resolve_xref
(env, fromdocname, builder, typ, ...)Resolve the pending_xref node with the given typ and target.
Attributes
dangling_warnings
role name -> a warning message if reference is missing
data_version
data version, bump this when the format of
self.data
changesdirective name -> directive class
enumerable_nodes
node_class -> (enum_node_type, title_getter)
a list of Index subclasses
data value for a fresh environment
domain label: longer, more descriptive (used in messages)
domain name: should be short, but unique
type (usually directive) name -> ObjType instance
role name -> role callable
data
data value
- name = 'bk'
domain name: should be short, but unique
- label = 'Blark'
domain label: longer, more descriptive (used in messages)
- object_types: ClassVar[Dict[str, ObjType]] = {'declaration': <sphinx.domains.ObjType object>, 'function': <sphinx.domains.ObjType object>, 'function_block': <sphinx.domains.ObjType object>, 'gvl': <sphinx.domains.ObjType object>, 'module': <sphinx.domains.ObjType object>, 'program': <sphinx.domains.ObjType object>, 'source_code': <sphinx.domains.ObjType object>, 'type': <sphinx.domains.ObjType object>, 'variable_block': <sphinx.domains.ObjType object>}
type (usually directive) name -> ObjType instance
- directives: ClassVar[Dict[str, Type[BlarkDirective]]] = {'declaration': <class 'blark.sphinxdomain.DeclarationDirective'>, 'function': <class 'blark.sphinxdomain.FunctionDirective'>, 'function_block': <class 'blark.sphinxdomain.FunctionBlockDirective'>, 'gvl': <class 'blark.sphinxdomain.GvlDirective'>, 'program': <class 'blark.sphinxdomain.ProgramDirective'>, 'type': <class 'blark.sphinxdomain.TypeDirective'>, 'variable_block': <class 'blark.sphinxdomain.VariableBlockDirective'>}
directive name -> directive class
- roles: Dict[str, BlarkXRefRole] = {'declaration': <blark.sphinxdomain.BlarkXRefRole object>, 'fb': <blark.sphinxdomain.BlarkXRefRole object>, 'function': <blark.sphinxdomain.BlarkXRefRole object>, 'function_block': <blark.sphinxdomain.BlarkXRefRole object>, 'gvl': <blark.sphinxdomain.BlarkXRefRole object>, 'mod': <blark.sphinxdomain.BlarkXRefRole object>, 'program': <blark.sphinxdomain.BlarkXRefRole object>, 'type': <blark.sphinxdomain.BlarkXRefRole object>}
role name -> role callable
- initial_data: ClassVar[Dict[str, Dict[str, Any]]] = {'action': {}, 'declaration': {}, 'function': {}, 'function_block': {}, 'gvl': {}, 'method': {}, 'module': {}, 'program': {}, 'type': {}}
data value for a fresh environment
- indices: List[Index] = []
a list of Index subclasses
- resolve_xref(env: sphinx.environment.BuildEnvironment, fromdocname: str, builder: Builder, typ: str, target: str, node: addnodes.pending_xref, contnode: nodes.Element) nodes.reference [source]
Resolve the pending_xref node with the given typ and target.
This method should return a new node, to replace the xref node, containing the contnode which is the markup content of the cross-reference.
If no resolution can be found, None can be returned; the xref node will then given to the :event:`missing-reference` event, and if that yields no resolution, replaced by contnode.
The method can also raise
sphinx.environment.NoUri
to suppress the :event:`missing-reference` event being emitted.