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

force () in complex bool expressions: (a && b) || c instead of a && b || c

This commit is contained in:
Alexander Medvednikov
2019-08-04 10:18:31 +02:00
parent 58117f1312
commit 350e13679c
7 changed files with 33 additions and 9 deletions

View File

@ -282,7 +282,7 @@ fn (s mut Scanner) scan() ScanRes {
return scan_res(.name, name)
}
// `123`, `.123`
else if c.is_digit() || c == `.` && nextc.is_digit() {
else if c.is_digit() || (c == `.` && nextc.is_digit()) {
num := s.ident_number()
return scan_res(.number, num)
}