v.scanner: fix error messages with unexpected token `?` (#11428)
parent
bee5e7de03
commit
79c2bca401
|
@ -0,0 +1,5 @@
|
|||
vlib/v/parser/tests/unexpected_token.vv:2:10: error: unexpected token `?`
|
||||
1 | fn main() {
|
||||
2 | println(?)
|
||||
| ^
|
||||
3 | }
|
|
@ -0,0 +1,3 @@
|
|||
fn main() {
|
||||
println(?)
|
||||
}
|
|
@ -771,7 +771,7 @@ fn (mut s Scanner) text_scan() token.Token {
|
|||
return s.new_token(.mod, '', 1)
|
||||
}
|
||||
`?` {
|
||||
return s.new_token(.question, '', 1)
|
||||
return s.new_token(.question, '?', 1)
|
||||
}
|
||||
scanner.single_quote, scanner.double_quote {
|
||||
start_line := s.line_nr
|
||||
|
|
Loading…
Reference in New Issue