Skip to main content

blues_lsp/syntax/
buildctx.rs

1use std::sync::Arc;
2
3use crate::project::{PkgHandle, file::FileContents};
4
5use super::{diagnostic::FileDiagnostics, location::OriginTable};
6
7pub struct BuildCtx {
8    pub pkg: PkgHandle,
9    pub origins: OriginTable,
10    pub diagnostics: FileDiagnostics,
11}
12
13impl BuildCtx {
14    pub fn new(pkg: PkgHandle, file: Arc<FileContents>) -> Self {
15        Self {
16            pkg,
17            origins: OriginTable::new(file),
18            diagnostics: FileDiagnostics::default(),
19        }
20    }
21}