1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vet: prohibit spaces before )

This commit is contained in:
Alexander Medvednikov 2020-07-11 12:14:10 +02:00
parent 54da8371ac
commit 2a696cb837

View File

@ -779,6 +779,10 @@ fn (mut s Scanner) text_scan() token.Token {
return s.new_token(.lpar, '', 1)
}
`)` {
// TODO `$if vet {` for performance
if s.pref.is_vet && s.text[s.pos - 1] == ` ` {
println('$s.file_path:$s.line_nr: Looks like you are adding a space before `)`')
}
return s.new_token(.rpar, '', 1)
}
`[` {