Skip to content

Commit

Permalink
Merge pull request #314 from LPCIC/fix-chr-removal
Browse files Browse the repository at this point in the history
trace: be resilient to negative chars
  • Loading branch information
gares authored Feb 10, 2025
2 parents 1277858 + 671fb4a commit 40794fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/elpi_trace_elaborator.ml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ let int_of_string s =
let decode_loc s =
if Str.(string_match (regexp "File .(context step_id:\\([0-9]+\\))") s 0) then
`Context (int_of_string (Str.matched_group 1 s))
else if Str.(string_match (regexp "File .\\([^,]+\\)., line \\([0-9]+\\), column \\([0-9]+\\), characters? \\([0-9]+\\)-?[0-9]*") s 0) then
else if Str.(string_match (regexp "File .\\([^,]+\\)., line \\([0-9]+\\), column \\([0-9]+\\), characters? -*\\([0-9]+\\)-*[0-9]*") s 0) then
`File {
filename = Str.matched_group 1 s;
line = Str.matched_group 2 s |> int_of_string;
Expand Down

0 comments on commit 40794fc

Please sign in to comment.