scanner: add an error for unfinished string literals (#6519)
parent
11b16a63cf
commit
0f1ed1ca09
|
@ -0,0 +1,2 @@
|
|||
vlib/v/checker/tests/unfinished_string.vv:2:1: error: unfinished string literal
|
||||
1 | a := '
|
|
@ -0,0 +1 @@
|
|||
a := '
|
|
@ -1193,7 +1193,7 @@ fn (mut s Scanner) ident_string() string {
|
|||
for {
|
||||
s.pos++
|
||||
if s.pos >= s.text.len {
|
||||
break
|
||||
s.error('unfinished string literal')
|
||||
}
|
||||
c := s.text[s.pos]
|
||||
prevc := s.text[s.pos - 1]
|
||||
|
|
Loading…
Reference in New Issue