diff options
author | Guillaume Boisseau | 2024-06-18 13:49:43 +0200 |
---|---|---|
committer | GitHub | 2024-06-18 13:49:43 +0200 |
commit | 370f2668f0a36fb31ed9abb4ba613dad333cf406 (patch) | |
tree | d1a6549cdd2f8e20366b8a5feaa1550fc10fe783 /compiler/Errors.ml | |
parent | 43a9fb0fa5a1c03a7cce575a052f0d4201189d1d (diff) | |
parent | 926eb538cc35cf9a818a6905ff4ce58eeb3db9c4 (diff) |
Merge pull request #251 from Nadrieril/bump-charon2
Diffstat (limited to '')
-rw-r--r-- | compiler/Errors.ml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/Errors.ml b/compiler/Errors.ml index 6e2de7e1..838e1e37 100644 --- a/compiler/Errors.ml +++ b/compiler/Errors.ml @@ -1,7 +1,6 @@ let log = Logging.errors_log -let span_to_string (span : Meta.span) = - let raw_span = span.span in +let raw_span_to_string (raw_span : Meta.raw_span) = let file = match raw_span.file with Virtual s | Local s -> s in let loc_to_string (l : Meta.loc) : string = string_of_int l.line ^ ":" ^ string_of_int l.col @@ -11,6 +10,8 @@ let span_to_string (span : Meta.span) = ^ "-" ^ loc_to_string raw_span.end_loc +let span_to_string (span : Meta.span) = raw_span_to_string span.span + let format_error_message (span : Meta.span option) (msg : string) = let span = match span with None -> "" | Some span -> "\n" ^ span_to_string span |