Skip to content

Commit

Permalink
[flow] Rename run_opt_loc to run_loc_opt to match map_loc_opt
Browse files Browse the repository at this point in the history
Summary:
Rename `run_opt_loc` (from `Flow_ast_visitor`) to `run_loc_opt` to match `map_loc_opt` (from `Flow_ast_mapper`).

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D69936255

fbshipit-source-id: 23a12d63a9e9b8e80212001b7bdfa720193fbd6b
  • Loading branch information
gkz authored and facebook-github-bot committed Feb 20, 2025
1 parent dcee48a commit 95bcff8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/analysis/env_builder/find_providers.ml
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ end = struct
let env2 =
this#accumulate_branch_env
(env0, cx)
(fun () -> run_opt_loc this#if_alternate_statement alternate)
(fun () -> run_loc_opt this#if_alternate_statement alternate)
env1
in
this#set_acc (env2, cx);
Expand Down Expand Up @@ -703,11 +703,11 @@ end = struct
let env' =
this#accumulate_branch_env
(env0, cx)
(fun () -> run_opt_loc this#catch_clause handler)
(fun () -> run_loc_opt this#catch_clause handler)
env'
in
let env' =
this#accumulate_branch_env (env0, cx) (fun () -> run_opt_loc this#block finalizer) env'
this#accumulate_branch_env (env0, cx) (fun () -> run_loc_opt this#block finalizer) env'
in
this#set_acc (env', cx);
stmt
Expand Down
2 changes: 1 addition & 1 deletion src/parser_utils/flow_ast_visitor.ml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let run_opt : 'node. ('node -> 'node) -> 'node option -> unit =
let run_loc : ('loc -> 'node -> 'node) -> 'loc * 'node -> unit =
(fun visit (loc, node) -> ignore @@ visit loc node)

let run_opt_loc : ('loc -> 'node -> 'node) -> ('loc * 'node) option -> unit =
let run_loc_opt : ('loc -> 'node -> 'node) -> ('loc * 'node) option -> unit =
(fun visit -> Base.Option.iter ~f:(fun (loc, node) -> ignore @@ visit loc node))

let run_list : 'node. ('node -> 'node) -> 'node list -> unit = (fun visit -> List.iter (run visit))
Expand Down

0 comments on commit 95bcff8

Please sign in to comment.