DSMSourceField¶
- class dsviper.DSMSourceField¶
Bases:
objectA struct field and its source spans (name, type, whole declaration, doc).
Note: Not directly instantiable.
- declaration_span() DSMSourceSpan | None¶
Return the DSMSourceSpan of the whole field declaration, or None.
- default_span() DSMSourceSpan | None¶
Return the DSMSourceSpan of the field’s default clause — the ‘=’ through the literal — or None when the field declares no default.
- documentation_span() DSMSourceSpan | None¶
Return the DSMSourceSpan of the field docstring, or None.
- name() str¶
Return the field name.
- name_span() DSMSourceSpan | None¶
Return the DSMSourceSpan of the field name, or None.
- type_span() DSMSourceSpan | None¶
Return the DSMSourceSpan of the field type expression, or None.