aboutsummaryrefslogtreecommitdiff
path: root/crates/libanalysis
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-10 22:55:32 +0100
committerAleksey Kladov <[email protected]>2018-08-10 22:55:32 +0100
commit9863b9161d8d702848516be70c5c8161b7f382e8 (patch)
tree3aa95abbacf0897e4e738e1fc8ccf10492b7c60c /crates/libanalysis
parent836e0c1863eaea5dffdf76a658c2ee9d7bc22e6f (diff)
decorations
Diffstat (limited to 'crates/libanalysis')
-rw-r--r--crates/libanalysis/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/libanalysis/src/lib.rs b/crates/libanalysis/src/lib.rs
index 6a946a0b0..74f043a9b 100644
--- a/crates/libanalysis/src/lib.rs
+++ b/crates/libanalysis/src/lib.rs
@@ -24,6 +24,7 @@ pub struct WorldState {
24 data: Arc<WorldData> 24 data: Arc<WorldData>
25} 25}
26 26
27#[derive(Clone, Debug)]
27pub struct World { 28pub struct World {
28 data: Arc<WorldData>, 29 data: Arc<WorldData>,
29} 30}
@@ -119,12 +120,13 @@ impl World {
119} 120}
120 121
121 122
122#[derive(Default)] 123#[derive(Default, Debug)]
123struct WorldData { 124struct WorldData {
124 mem_map: HashMap<PathBuf, Arc<String>>, 125 mem_map: HashMap<PathBuf, Arc<String>>,
125 file_map: RwLock<HashMap<PathBuf, Arc<FileData>>>, 126 file_map: RwLock<HashMap<PathBuf, Arc<FileData>>>,
126} 127}
127 128
129#[derive(Debug)]
128struct FileData { 130struct FileData {
129 text: Option<String>, 131 text: Option<String>,
130 syntax: OnceCell<ast::File>, 132 syntax: OnceCell<ast::File>,