Skip to content

Commit

Permalink
rename for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
PizieDust committed Jun 27, 2024
1 parent dc3d73e commit 78c93e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/analysis/ppx_expand.ml
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ let check_extension ~parsetree ~pos =
in
!kind

let get_ppxed_source ~ppxed_parsetree ~pos ppx_kind_attr :
let get_ppxed_source ~ppxed_parsetree ~pos ppx_kind_with_attr :
Query_protocol.ppxed_source =
let expression = ref [] in
let signature = ref [] in
let structure = ref [] in
let () =
match ppx_kind_attr with
match ppx_kind_with_attr with
| Expr original_expr, _ -> (
let expr (self : Ast_iterator.iterator)
(new_expr : Parsetree.expression) =
Expand Down Expand Up @@ -124,7 +124,7 @@ let get_ppxed_source ~ppxed_parsetree ~pos ppx_kind_attr :
| `Interface si -> iterator.signature iterator si
| `Implementation str -> iterator.structure iterator str)
in
match (ppx_kind_attr : ppx_kind * Warnings.loc) with
match (ppx_kind_with_attr : ppx_kind * Warnings.loc) with
| Expr _, ext_loc ->
let exp =
List.iter
Expand Down
6 changes: 3 additions & 3 deletions src/frontend/query_commands.ml
Original file line number Diff line number Diff line change
Expand Up @@ -515,12 +515,12 @@ let dispatch pipeline (type a) : a Query_protocol.t -> a =
let pos = Mpipeline.get_lexing_pos pipeline pos in
let parsetree = Mpipeline.reader_parsetree pipeline in
let ppxed_parsetree = Mpipeline.ppx_parsetree pipeline in
let ppx_kind_attr = Ppx_expand.check_extension ~parsetree ~pos in
match ppx_kind_attr with
let ppx_kind_with_attr = Ppx_expand.check_extension ~parsetree ~pos in
match ppx_kind_with_attr with
| Some _ ->
`Found
(Ppx_expand.get_ppxed_source ~ppxed_parsetree ~pos
(Option.get ppx_kind_attr))
(Option.get ppx_kind_with_attr))
| None -> `No_ppx)

| Locate (patho, ml_or_mli, pos) ->
Expand Down

0 comments on commit 78c93e8

Please sign in to comment.