File tree 4 files changed +9
-7
lines changed 4 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ let rec collect ?(checkDir = fun _ -> true) path test =
98
98
99
99
type classifiedFile = Res | Resi | Other
100
100
101
- let classifyFile path =
101
+ let classifySourceFile path =
102
102
if Filename. check_suffix path " .res" && exists path then Res
103
103
else if Filename. check_suffix path " .resi" && exists path then Resi
104
104
else Other
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. classifyFile path = Res then
92
+ (if Files. classifySourceFile path = Res 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. classifyFile path = Res then
153
+ (if Files. classifySourceFile path = Res 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 @@ -398,15 +398,17 @@ let command ~debug ~emitter ~path =
398
398
let structure_item (iterator : Ast_iterator.iterator )
399
399
(item : Parsetree.structure_item ) =
400
400
(match item.pstr_desc with
401
- | Pstr_primitive {pval_name = {txt = id ; loc} } -> emitter |> emitVariable ~id ~debug ~loc ;
401
+ | Pstr_primitive {pval_name = {txt = id ; loc} } ->
402
+ emitter |> emitVariable ~id ~debug ~loc
402
403
| _ -> () );
403
404
Ast_iterator. default_iterator.structure_item iterator item
404
405
in
405
406
406
407
let signature_item (iterator : Ast_iterator.iterator )
407
408
(item : Parsetree.signature_item ) =
408
409
(match item.psig_desc with
409
- | Psig_value {pval_name = {txt = id ; loc} } -> emitter |> emitVariable ~id ~debug ~loc ;
410
+ | Psig_value {pval_name = {txt = id ; loc} } ->
411
+ emitter |> emitVariable ~id ~debug ~loc
410
412
| _ -> () );
411
413
Ast_iterator. default_iterator.signature_item iterator item
412
414
in
@@ -431,7 +433,7 @@ let command ~debug ~emitter ~path =
431
433
}
432
434
in
433
435
434
- if Files. classifyFile path = Res then (
436
+ if Files. classifySourceFile path = Res then (
435
437
let parser =
436
438
Res_driver. parsingEngine.parseImplementation ~for Printer:false
437
439
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 Files. classifyFile currentFile = Res ->
305
+ | Some full when Files. classifySourceFile currentFile = Res ->
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