7 var opts
= new OptionContext
13 var notes
= new Array[Note]
19 if not notes
.is_empty
then
21 for n
in notes
do print n
25 fun fatal_error
(n
: ANode, msg
: String)
27 notes
.add
( new Fatal(n
.location
, msg
) )
31 # Reset failure status
32 fun reset
do failed
= false
35 fun clear
do notes
= new Array[Note]
40 var to
: nullable Location = null
43 init (line
: Location, msg
: String)
48 init range
(from
, to
: Location, msg
: String)
55 fun prefix
: String is abstract
60 s
+= " from {line} to {to}"
61 s
= "{line.to_file_s}:{line.to_line_s}--{to.to_line_s}; "
63 s
= "{line.to_file_s}:{line.to_line_s}; "
65 return "{prefix}{s}{msg}"
71 init (line
: Location, msg
: String) do super
72 init range
(from
, to
: Location, msg
: String) do super
73 redef fun prefix
do return "Warning: "
78 init (line
: Location, msg
: String) do super
79 init range
(from
, to
: Location, msg
: String) do super
80 redef fun prefix
do return "Error: "
85 init (line
: Location, msg
: String) do super
86 init range
(from
, to
: Location, msg
: String) do super
87 redef fun prefix
do return "Fatal: "
91 protected fun manager
: AnalysisManager is abstract
98 return line_start
.to_s
101 fun to_file_s
: String