Skip to content

Commit

Permalink
[messageReporting] Add config to use absolute positions (HaxeFoundati…
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz committed Dec 27, 2023
1 parent c3e2a41 commit 7b38727
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/compiler/messageReporting.ml
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ let get_max_line max_lines messages =
) max_lines messages

let display_source_at com p =
let ectx = create_error_context () in
let absolute_positions = Define.defined com.defines Define.MessageAbsolutePositions in
let ectx = create_error_context absolute_positions in
let msg = make_compiler_message "" p 0 MessageKind.DKCompilerMessage MessageSeverity.Information in
ectx.max_lines <- get_max_line ectx.max_lines [msg];
match compiler_pretty_message_string com ectx msg with
Expand Down

0 comments on commit 7b38727

Please sign in to comment.