File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ let structure_item_of_expr ~loc expr =
4343 pstr_loc= loc;
4444 }
4545
46- let map_comprehension ~loc extension_name body comp_list : extension =
46+ let map_comprehension ~loc :orig_loc extension_name body comp_list : extension =
47+ let loc = { orig_loc with Location. loc_ghost = true } in
4748 (* This is unreachable and just used as a place holder.*)
4849 let unreachable =
4950 {
@@ -86,7 +87,7 @@ let map_comprehension ~loc extension_name body comp_list : extension=
8687 ) comp_list
8788 in
8889 let payload = PStr ((structure_item_of_expr ~loc body)::list ) in
89- { txt= extension_name; loc; }, payload
90+ { txt= extension_name; loc= orig_loc ; }, payload
9091
9192let unwrap_expression ~loc = function
9293| Pstr_eval (exp , _ ) -> exp
@@ -162,7 +163,7 @@ let report_error ~loc = function
162163 | Extension_not_existent extension_name ->
163164 Location. errorf ~loc " Extension %s does not exsist." extension_name
164165 | Illegal_comprehension_extension_construct ->
165- Location. errorf ~loc " Wrong extension sytax for comprehensions."
166+ Location. errorf ~loc " Wrong extension syntax for comprehensions."
166167
167168let () =
168169 Location. register_error_of_exn
You can’t perform that action at this time.
0 commit comments