File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change 2
2
// Use of this source code is governed by an MIT license that can
3
3
// be found in the LICENSE file.
4
4
5
- import std/strings;
6
-
7
5
import ../token;
8
6
9
7
public enum Node {
Original file line number Diff line number Diff line change @@ -660,10 +660,10 @@ extend Tokenizer {
660
660
}
661
661
662
662
func read_string(mut self) -> string {
663
+ start := self.pos + 1;
663
664
self.pos -= 1;
664
665
pos := self.current_pos();
665
666
self.pos += 1;
666
- start := self.pos;
667
667
start_char := self.current_char();
668
668
mut backslash_count := if start_char == BACKSLASH { 1 } else { 0 };
669
669
is_raw := self.pos > 0 and self.text[self.pos - 1] == b'r';
@@ -733,7 +733,7 @@ extend Tokenizer {
733
733
734
734
mut lit := "";
735
735
if start <= self.pos {
736
- lit = self.text[start + 1 ..self.pos].clone();
736
+ lit = self.text[start..self.pos].clone();
737
737
if !self.prefs.is_fmt {
738
738
mut segment_idx: uint := 0;
739
739
mut str_segments := @vec(string);
You can’t perform that action at this time.
0 commit comments