mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parent
af8bd10761
commit
7227c1d508
@ -849,7 +849,7 @@ fn (mut s Scanner) text_scan() token.Token {
|
||||
return s.new_token(.and_assign, '', 2)
|
||||
}
|
||||
afternextc := s.look_ahead(2)
|
||||
if nextc == `&` && afternextc.is_space() {
|
||||
if nextc == `&` && (afternextc.is_space() || afternextc == `!`) {
|
||||
s.pos++
|
||||
return s.new_token(.and, '', 2)
|
||||
}
|
||||
|
5
vlib/v/tests/scanner_and_and_not_test.v
Normal file
5
vlib/v/tests/scanner_and_and_not_test.v
Normal file
@ -0,0 +1,5 @@
|
||||
fn test_and_and_not_parses() {
|
||||
ok1 := true
|
||||
ok2 := false && !ok1
|
||||
assert ok2 == false
|
||||
}
|
Loading…
Reference in New Issue
Block a user