Skip to content

Commit acdb6cc

Browse files
committed
rename
1 parent 8bee991 commit acdb6cc

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

analysis/src/Completion.ml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -264,20 +264,20 @@ let extractExpApplyArgs ~text ~(funName : Longident.t Location.loc) ~args =
264264
in
265265
args |> processArgs ~lastOffset ~lastPos ~acc:[]
266266

267-
let rec exporToContextPath (e : Parsetree.expression) =
267+
let rec exprToContextPath (e : Parsetree.expression) =
268268
match e.pexp_desc with
269269
| Pexp_constant (Pconst_string _) -> Some CPString
270270
| Pexp_array _ -> Some CPArray
271271
| Pexp_ident {txt} -> Some (CPId (Utils.flattenLongIdent txt, Value))
272272
| Pexp_field (e1, {txt = Lident name}) -> (
273-
match exporToContextPath e1 with
273+
match exprToContextPath e1 with
274274
| Some contextPath -> Some (CPField (contextPath, name))
275275
| _ -> None)
276276
| Pexp_field (_, {txt = Ldot (lid, name)}) ->
277277
(* Case x.M.field ignore the x part *)
278278
Some (CPField (CPId (Utils.flattenLongIdent lid, Module), name))
279279
| Pexp_send (e1, {txt}) -> (
280-
match exporToContextPath e1 with
280+
match exprToContextPath e1 with
281281
| None -> None
282282
| Some contexPath -> Some (CPObj (contexPath, txt)))
283283
| _ -> None
@@ -473,7 +473,7 @@ let completionWithParser ~debug ~path ~posCursor ~currentFile ~text =
473473
(Loc.toString expr.pexp_loc)
474474
in
475475
let setPipeResult ~(lhs : Parsetree.expression) ~id =
476-
match exporToContextPath lhs with
476+
match exprToContextPath lhs with
477477
| Some pipe ->
478478
setResult (Cpath (CPPipe (pipe, id)));
479479
true
@@ -538,7 +538,7 @@ let completionWithParser ~debug ~path ~posCursor ~currentFile ~text =
538538
if fieldName.loc |> Loc.hasPos ~pos:posBeforeCursor then
539539
match fieldName.txt with
540540
| Lident name -> (
541-
match exporToContextPath e with
541+
match exprToContextPath e with
542542
| Some contextPath ->
543543
let contextPath = CPField (contextPath, name) in
544544
setResult (Cpath contextPath)
@@ -553,7 +553,7 @@ let completionWithParser ~debug ~path ~posCursor ~currentFile ~text =
553553
setResult (Cpath contextPath)
554554
| Lapply _ -> ()
555555
else if Loc.end_ e.pexp_loc = posBeforeCursor then
556-
match exporToContextPath e with
556+
match exprToContextPath e with
557557
| Some contextPath -> setResult (Cpath (CPField (contextPath, "")))
558558
| None -> ())
559559
| Pexp_apply ({pexp_desc = Pexp_ident compName}, args)
@@ -641,7 +641,7 @@ let completionWithParser ~debug ~path ~posCursor ~currentFile ~text =
641641
labelRange |> Range.hasPos ~pos:posBeforeCursor
642642
|| (label = "" && posCursor = fst labelRange)
643643
then
644-
match exporToContextPath lhs with
644+
match exprToContextPath lhs with
645645
| Some contextPath -> setResult (Cpath (CPObj (contextPath, label)))
646646
| None -> ())
647647
| Pexp_let (recFlag, bindings, e) ->

0 commit comments

Comments
 (0)