Skip to content

Commit

Permalink
refactor: share exception with glob parser (#546)
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrinberg authored Oct 25, 2024
1 parent 9d58581 commit 61409cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/glob.ml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

module Re = Core

exception Parse_error
exception Parse_error = Parse_buffer.Parse_error

type enclosed =
| Char of char
Expand Down
1 change: 1 addition & 0 deletions lib/parse_buffer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ let accept_s t s' =
let len = String.length s' in
try
for j = 0 to len - 1 do
(* CR-someday rgrinberg: stop relying on bound checks *)
try if s'.[j] <> t.str.[t.pos + j] then raise_notrace Exit with
| _ -> raise_notrace Exit
done;
Expand Down

0 comments on commit 61409cd

Please sign in to comment.