File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,13 +35,13 @@ let update_match f m =
3535 { m with range; environment }
3636
3737let convert_offset ~fast ~source match_ =
38+ let index =
39+ if fast then
40+ Offset. index ~source
41+ else
42+ Offset. empty
43+ in
3844 let f offset =
39- let index =
40- if fast then
41- Offset. index ~source
42- else
43- Offset. empty
44- in
4545 if fast then
4646 Offset. convert_fast ~offset index
4747 else
Original file line number Diff line number Diff line change @@ -829,8 +829,7 @@ module Make (Language : Types.Language.S) (Meta : Metasyntax.S) (Ext : External.
829829 let prefix = prefix >> = fun s -> r acc (String s) in
830830 let first_match_attempt = choice [ match_one; prefix ] in
831831 (* consumes a character in prefix if no match *)
832- let matches = many first_match_attempt *> end_of_input in
833- matches >> = fun _result -> r acc Unit )
832+ skip_many first_match_attempt *> end_of_input >> = fun () -> r acc Unit )
834833
835834 let to_template template rule =
836835 match parse_string ~consume: All (general_parser_generator rule) template with
Original file line number Diff line number Diff line change @@ -531,7 +531,10 @@ let sep_by s p =
531531
532532let skip_many p =
533533 fix (fun m ->
534- (p *> m) < |> return () )
534+ ((p >> | fun _ -> true ) < |> return false ) >> = function
535+ | true -> m
536+ | false -> return ()
537+ )
535538
536539let skip_many1 p =
537540 p *> skip_many p
You can’t perform that action at this time.
0 commit comments