7 var opts
= new OptionContext
11 var notes
= new Array[Note]
17 if not notes
.is_empty
then
19 for n
in notes
do print n
23 fun fatal_error
(n
: ANode, msg
: String)
25 notes
.add
( new Fatal(n
.location
, msg
) )
29 # Reset failure status
30 fun reset
do failed
= false
33 fun clear
do notes
= new Array[Note]
38 var to
: nullable Location = null
41 init (line
: Location, msg
: String)
46 init range
(from
, to
: Location, msg
: String)
53 fun prefix
: String is abstract
58 s
+= " from {line} to {to}"
59 s
= "{line.to_file_s}:{line.to_line_s}--{to.to_line_s}; "
61 s
= "{line.to_file_s}:{line.to_line_s}; "
63 return "{prefix}{s}{msg}"
69 init (line
: Location, msg
: String) do super
70 init range
(from
, to
: Location, msg
: String) do super
71 redef fun prefix
do return "Warning: "
76 init (line
: Location, msg
: String) do super
77 init range
(from
, to
: Location, msg
: String) do super
78 redef fun prefix
do return "Error: "
83 init (line
: Location, msg
: String) do super
84 init range
(from
, to
: Location, msg
: String) do super
85 redef fun prefix
do return "Fatal: "
92 return line_start
.to_s
101 fun manager
: AnalysisManager do return once
new AnalysisManager