@@ -26,8 +26,8 @@ pub mut:
26
26
file_path string // '/path/to/file.v'
27
27
file_base string // 'file.v'
28
28
text string // the whole text of the file
29
- pos int // current position in the file, first character is s.text[0]
30
- line_nr int // current line number
29
+ pos int = - 1 // current position in the file, first character is s.text[0]
30
+ line_nr int // current line number
31
31
last_nl_pos int = - 1 // for calculating column
32
32
is_crlf bool // special check when computing columns
33
33
is_inside_string bool // set to true in a string, *at the start* of an $var or ${expr}
@@ -38,7 +38,6 @@ pub mut:
38
38
is_nested_enclosed_inter bool
39
39
line_comment string
40
40
last_lt int = - 1 // position of latest <
41
- is_started bool
42
41
is_print_line_on_error bool
43
42
is_print_colored_error bool
44
43
is_print_rel_paths_on_error bool
@@ -662,11 +661,7 @@ pub fn (mut s Scanner) text_scan() token.Token {
662
661
// That optimization mostly matters for long sections
663
662
// of comments and string literals.
664
663
for {
665
- if s.is_started {
666
- s.pos++
667
- } else {
668
- s.is_started = true
669
- }
664
+ s.pos++
670
665
if ! s.is_inside_string {
671
666
s.skip_whitespace ()
672
667
}
@@ -1839,7 +1834,6 @@ pub fn (mut s Scanner) prepare_for_new_text(text string) {
1839
1834
s.is_crlf = false
1840
1835
s.is_inside_string = false
1841
1836
s.is_nested_string = false
1842
- s.is_started = false
1843
1837
s.is_inter_start = false
1844
1838
s.is_inter_end = false
1845
1839
s.is_enclosed_inter = false
0 commit comments