File tree Expand file tree Collapse file tree 3 files changed +5
-34
lines changed Expand file tree Collapse file tree 3 files changed +5
-34
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ impl LanguageServer for LanguageServerBackend {
255255 let file_path = uri. to_file_path ( ) . unwrap ( ) ;
256256 let mut workspace = self . compiler_workspace . borrow_mut ( ) ;
257257 let file = workspace. get_file_mut ( & file_path) . unwrap ( ) ;
258- if let Some ( RichAst { ast : Some ( ast ) , .. } ) = & mut file. rich_ast {
258+ if let Some ( RichAst { ast, .. } ) = & mut file. rich_ast {
259259 let mut finder = VariableDeclarationFinder :: new ( id) ;
260260 finder. visit_datex_expression ( ast) ;
261261 Ok ( finder. variable_declaration_position . map ( |position| {
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ impl LanguageServerBackend {
5757 let mut workspace = self . compiler_workspace . borrow_mut ( ) ;
5858 let file = workspace. get_file_mut ( & file_path) . unwrap ( ) ;
5959 if let Some ( rich_ast) = & mut file. rich_ast {
60- let ast = rich_ast. ast . as_mut ( ) . unwrap ( ) ;
60+ let ast = & mut rich_ast. ast ;
6161 let mut collector = TypeHintCollector :: default ( ) ;
6262 collector. visit_datex_expression ( ast) ;
6363 Some (
@@ -238,13 +238,14 @@ impl LanguageServerBackend {
238238 let mut workspace = self . compiler_workspace . borrow_mut ( ) ;
239239 let file_path = position. text_document . uri . to_file_path ( ) . unwrap ( ) ;
240240 if let Some ( rich_ast) = & mut workspace. get_file_mut ( & file_path) . unwrap ( ) . rich_ast {
241- let ast = rich_ast. ast . as_mut ( ) . unwrap ( ) ;
241+ let ast = & mut rich_ast. ast ;
242242 let mut finder = ExpressionFinder :: new ( byte_offset) ;
243243 finder. visit_datex_expression ( ast) ;
244244 finder. found_expr . map ( |e| DatexExpression {
245245 span : e. 1 ,
246246 data : e. 0 ,
247247 wrapped : None ,
248+ ty : None ,
248249 } )
249250 } else {
250251 None
You can’t perform that action at this time.
0 commit comments