mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
scanner: treat warnings as errors on -W too, simillar to the parser
This commit is contained in:
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
Block a user