diff options
Diffstat (limited to 'crates/libanalysis')
-rw-r--r-- | crates/libanalysis/src/lib.rs | 4 |
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)] | ||
27 | pub struct World { | 28 | pub 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)] |
123 | struct WorldData { | 124 | struct 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)] | ||
128 | struct FileData { | 130 | struct FileData { |
129 | text: Option<String>, | 131 | text: Option<String>, |
130 | syntax: OnceCell<ast::File>, | 132 | syntax: OnceCell<ast::File>, |