File tree Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -95,3 +95,5 @@ let rec collect ?(checkDir = fun _ -> true) path test =
95
95
|> List. concat
96
96
else []
97
97
| _ -> if test path then [path] else []
98
+
99
+ let isResFile path = exists path && Filename. check_suffix path " .res"
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ let inlay ~path ~pos ~maxLength ~debug =
89
89
Ast_iterator. default_iterator.value_binding iterator vb
90
90
in
91
91
let iterator = {Ast_iterator. default_iterator with value_binding} in
92
- (if Files. exists path && Filename. check_suffix path " .res " then
92
+ (if Files. isResFile path then
93
93
let parser =
94
94
Res_driver. parsingEngine.parseImplementation ~for Printer:false
95
95
in
@@ -150,7 +150,7 @@ let codeLens ~path ~debug =
150
150
let iterator = {Ast_iterator. default_iterator with value_binding} in
151
151
(* We only print code lenses in implementation files. This is because they'd be redundant in interface files,
152
152
where the definition itself will be the same thing as what would've been printed in the code lens. *)
153
- (if Files. exists path && Filename. check_suffix path " .res " then
153
+ (if Files. isResFile path then
154
154
let parser =
155
155
Res_driver. parsingEngine.parseImplementation ~for Printer:false
156
156
in
Original file line number Diff line number Diff line change @@ -431,7 +431,7 @@ let command ~debug ~emitter ~path =
431
431
}
432
432
in
433
433
434
- if Filename. check_suffix path " .res " then (
434
+ if Files. isResFile path then (
435
435
let parser =
436
436
Res_driver. parsingEngine.parseImplementation ~for Printer:false
437
437
in
Original file line number Diff line number Diff line change @@ -302,7 +302,7 @@ let parse ~filename =
302
302
303
303
let extractCodeActions ~path ~pos ~currentFile ~debug =
304
304
match Cmt. fullFromPath ~path with
305
- | Some full when Filename. check_suffix currentFile " .res " ->
305
+ | Some full when Files. isResFile currentFile ->
306
306
let structure, printExpr, printStructureItem =
307
307
parse ~filename: currentFile
308
308
in
You can’t perform that action at this time.
0 commit comments