special Comparable
redef type OTHER: Message
- readable attr _location: nullable Location
- readable attr _text: String
+ readable var _location: nullable Location
+ readable var _text: String
redef fun <(other: OTHER): Bool do
if location == null then return true
return location.as(not null) < other.location.as(not null)
end
+
+ redef fun to_s: String do
+ if location == null then
+ return text
+ else
+ return "{location}: {text}"
+ end
+ end
end
# Global context for tools
_message_sorter.sort(_messages)
for m in _messages do
- stderr.write("{m.text}\n")
+ stderr.write("{m}\n")
end
_messages.clear
end
# Display an info
- meth info(s: String, level: Int)
+ fun info(s: String, level: Int)
do
if level <= verbose_level then
print "{s}"
# If the module is already loaded, just return it without further processing.
fun get_module(module_name: Symbol, from: nullable MMModule): MMModule
do
- var m: MMModule
if from != null then
var dir: nullable MMDirectory = from.directory
while dir != null do