BasicDocument
- class BasicDocument
The base type of all documents corresponding to a single source file.
Children
Members defined in
BasicDocument(11 members)
RWThe current build state of this document.
RThe current state of this document inside a pipeline.
RThe tier of this document.
RLanguage identifier of this document
RRetrieve the mutex associated with this document
RWThe source text document associated with this document.
RWLocation of this document.
RThe version of the last build.
Identity based hash of this document.
Set
document_tierto another value.
Increment sema version.
Attributes
- property build_state: syside.BuildState
The current build state of this document.
This is typically used by the pipeline to select and execute appropriate phases.
- property document_state: syside.DocumentState
The current state of this document inside a pipeline.
This is automatically updated by the pipeline and allows monitoring its state from worker threads.
- property document_tier: syside.DocumentTier
The tier of this document.
This is used internally to optimize certain operations, especially on standard library documents.
- property language: str
Language identifier of this document
- property mutex: syside.SharedMutex[Self]
Retrieve the mutex associated with this document
- property text_document: syside.SharedMutex[syside.TextDocument] | None
The source text document associated with this document.
- property url: syside.Url
Location of this document.
Url is used for compatibility with LSP. Typically, local files will have absolute
file:///path/to/source.exturls.
- property version: syside.DocumentVersion
The version of the last build.
This corresponds to the version of
TextDocumentthis was built from.
Methods
- __hash__() int
Identity based hash of this document.
This is guaranteed to be unique or nearly unique globally (due to bit mixing). However, it is not stable across Python invocations.
- change_document_tier(arg: syside.DocumentTier, /) None
Set
document_tierto another value.This is a method rather than a function because tier should not change throughout document lifetime. Nevertheless, this is still useful in cases where a document has just been constructed and its attributes need to be changed.
- increment_version() None
Increment sema version.
Source version is automatically handled by source parser.