DSMSourceDeclaration¶
- class dsviper.DSMSourceDeclaration¶
Bases:
objectA declaration - struct, enum, concept, club or attachment - with its identifier and its source spans (name, block, documentation).
Note: Not directly instantiable.
- block_span() DSMSourceSpan | None¶
Return the DSMSourceSpan of the whole declaration block, or None.
It starts at the docstring when there is one and ends with the closing ‘;’.
- documentation_span() DSMSourceSpan | None¶
Return the DSMSourceSpan of the docstring, or None.
- identifier() str¶
Return the unique identifier of the declaration: ‘NameSpace::Name’ for a concept, club, enumeration or structure, and for an attachment its namespace, its key type written relative to that namespace, and its name, as Attachment.identifier() writes it.
- name_span() DSMSourceSpan | None¶
Return the DSMSourceSpan of the declaration name, or None.