Skip to content

Commit

Permalink
Fix ambiguous pattern-matching (#5)
Browse files Browse the repository at this point in the history
Signed-off-by: Kate <kit.ty.kate@disroot.org>
  • Loading branch information
kit-ty-kate committed Dec 2, 2020
1 parent 910f52d commit 4a4f08e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/parser_automaton_internal.ml
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ let closing : type u s. (u, s) state -> char -> s -> s =
fun state _char stack ->
if state.depth > 0
then (
let stack =
let stack : s =
match state.kind with
| Positions ->
(* Note we store end positions as inclusive in [Positions.t], so we use [delta:0],
Expand Down Expand Up @@ -477,7 +477,7 @@ let eps_push_atom : type u s. (u, s) epsilon_action =
fun state stack ->
let str = Buffer.contents state.atom_buffer in
Buffer.clear state.atom_buffer;
let stack =
let stack : s =
match state.kind with
| Positions ->
if is_not_ignoring state then add_non_quoted_atom_pos state ~atom:str;
Expand Down Expand Up @@ -505,7 +505,7 @@ let push_quoted_atom : type u s. (u, s) action =
fun state _char stack ->
let str = Buffer.contents state.atom_buffer in
Buffer.clear state.atom_buffer;
let stack =
let stack : s =
match state.kind with
| Positions ->
if is_not_ignoring state then add_pos state ~delta:0;
Expand Down

0 comments on commit 4a4f08e

Please sign in to comment.