mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
toml: fix multiline array bool scanner, add test (#18068)
This commit is contained in:
@ -142,7 +142,7 @@ pub fn (mut s Scanner) scan() !token.Token {
|
||||
|
||||
if util.is_key_char(byte_c) {
|
||||
key := s.extract_key()
|
||||
if !s.is_left_of_assign && (key == 'true' || key == 'false') {
|
||||
if u8(s.peek(1)) != `=` && (key == 'true' || key == 'false') {
|
||||
util.printdbg(@MOD + '.' + @STRUCT + '.' + @FN, 'identified a boolean "${key}" (${key.len})')
|
||||
return s.new_token(.boolean, key, key.len)
|
||||
}
|
||||
|
Reference in New Issue
Block a user