+class Message
+special Comparable
+ redef type OTHER: Message
+
+ readable var _location: nullable Location
+ readable var _text: String
+
+ redef fun <(other: OTHER): Bool do
+ if location == null then return true
+ if other.location == null then return false
+
+ return location.as(not null) < other.location.as(not null)
+ end
+
+ redef fun to_s: String do
+ var l = location
+ if l == null then
+ return text
+ else
+ return "{l}: {text}"
+ end
+ end
+end
+