Skip to content

Commit 40794fc

Browse files
authored
Merge pull request #314 from LPCIC/fix-chr-removal
trace: be resilient to negative chars
2 parents 1277858 + 671fb4a commit 40794fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/elpi_trace_elaborator.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ let int_of_string s =
235235
let decode_loc s =
236236
if Str.(string_match (regexp "File .(context step_id:\\([0-9]+\\))") s 0) then
237237
`Context (int_of_string (Str.matched_group 1 s))
238-
else if Str.(string_match (regexp "File .\\([^,]+\\)., line \\([0-9]+\\), column \\([0-9]+\\), characters? \\([0-9]+\\)-?[0-9]*") s 0) then
238+
else if Str.(string_match (regexp "File .\\([^,]+\\)., line \\([0-9]+\\), column \\([0-9]+\\), characters? -*\\([0-9]+\\)-*[0-9]*") s 0) then
239239
`File {
240240
filename = Str.matched_group 1 s;
241241
line = Str.matched_group 2 s |> int_of_string;

0 commit comments

Comments
 (0)