369c0a7919acaf900e4b0ebac6e26707ffe44209
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
) )
39 var to
: nullable Location = null
42 init (line
: Location, msg
: String)
47 init range
(from
, to
: Location, msg
: String)
54 fun prefix
: String is abstract
59 s
+= " from {line} to {to}"
60 s
= "{line.to_file_s}:{line.to_line_s}--{to.to_line_s}; "
62 s
= "{line.to_file_s}:{line.to_line_s}; "
64 return "{prefix}{s}{msg}"
70 init (line
: Location, msg
: String) do super
71 init range
(from
, to
: Location, msg
: String) do super
72 redef fun prefix
do return "Warning: "
77 init (line
: Location, msg
: String) do super
78 init range
(from
, to
: Location, msg
: String) do super
79 redef fun prefix
do return "Error: "
84 init (line
: Location, msg
: String) do super
85 init range
(from
, to
: Location, msg
: String) do super
86 redef fun prefix
do return "Fatal: "
90 protected fun manager
: AnalysisManager is abstract
97 return line_start
.to_s
100 fun to_file_s
: String