scanner: treat warnings as errors on -W too, simillar to the parser
parent
d60f148b0c
commit
7a8d6a7c7b
|
@ -1207,6 +1207,10 @@ fn (mut s Scanner) inc_line_number() {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (mut s Scanner) warn(msg string) {
|
pub fn (mut s Scanner) warn(msg string) {
|
||||||
|
if s.pref.warns_are_errors {
|
||||||
|
s.error(msg)
|
||||||
|
return
|
||||||
|
}
|
||||||
pos := token.Position{
|
pos := token.Position{
|
||||||
line_nr: s.line_nr
|
line_nr: s.line_nr
|
||||||
pos: s.pos
|
pos: s.pos
|
||||||
|
|
Loading…
Reference in New Issue