mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-18 18:25:00 +00:00
docs: refactor and documenting analyzer code (#44)
* dev: refactor and documenting analyzer code * dev: documenting some lsp api
This commit is contained in:
parent
da7028f59c
commit
2d2857e6f3
24 changed files with 381 additions and 259 deletions
|
@ -1,10 +1,12 @@
|
|||
mod adt;
|
||||
pub mod analysis;
|
||||
pub mod syntax;
|
||||
|
||||
pub(crate) mod diagnostics;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
pub use analysis::AnalysisContext;
|
||||
use typst_ts_core::TypstDocument;
|
||||
|
||||
pub use diagnostics::*;
|
||||
|
@ -54,6 +56,12 @@ pub struct VersionedDocument {
|
|||
pub document: Arc<TypstDocument>,
|
||||
}
|
||||
|
||||
pub trait SyntaxRequest {
|
||||
type Response;
|
||||
|
||||
fn request(self, ctx: &mut AnalysisContext) -> Option<Self::Response>;
|
||||
}
|
||||
|
||||
mod polymorphic {
|
||||
use super::prelude::*;
|
||||
use super::*;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue