aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/feedback.ml
diff options
context:
space:
mode:
authorGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2016-06-25 16:05:25 +0200
committerGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2016-06-25 17:17:45 +0200
commit893ea5219eb74aedf93bd53f23b5e050fb9acbf6 (patch)
treeb1ee17d5fdbc321c30573b6c70a9c7389cf44a33 /lib/feedback.ml
parentc9f9a159818c138af3b8d8a3a1023a66b88be207 (diff)
[feedback] Allow messages to carry a location.
The new warnings mechanism may which to forward a location to IDEs. This also makes sense for other message types. Next step is to remove redundant MsgError feedback type.
Diffstat (limited to 'lib/feedback.ml')
-rw-r--r--lib/feedback.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/feedback.ml b/lib/feedback.ml
index 12b8b27ff..c2b512e99 100644
--- a/lib/feedback.ml
+++ b/lib/feedback.ml
@@ -36,8 +36,8 @@ type feedback_content =
| FileLoaded of string * string
(* Extra metadata *)
| Custom of Loc.t * string * xml
- (* Old generic messages *)
- | Message of level * Richpp.richpp
+ (* Generic messages *)
+ | Message of level * Loc.t option * Richpp.richpp
type feedback = {
id : edit_or_state_id;
@@ -142,7 +142,7 @@ let feedback ?id ?route what =
let feedback_logger ?loc lvl msg =
feedback ~route:!feedback_route ~id:!feedback_id
- (Message (lvl, Richpp.richpp_of_pp msg))
+ (Message (lvl, loc, Richpp.richpp_of_pp msg))
(* Output to file *)
let ft_logger old_logger ft ?loc level mesg =