Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ahabhgk committed Nov 11, 2024
1 parent fed0acc commit 14f99f8
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions src/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,28 +348,24 @@ impl<'s> Lexer<'s> {
pub fn consume_string<T: Visitor<'s>>(&mut self, visitor: &mut T, end: char) -> Option<()> {
let start = self.cur_pos()?;
self.consume();
'outer: loop {
loop {
let c = self.cur()?;
if c == end {
self.consume();
break;
}
if is_new_line(c) {
} else if is_new_line(c) {
break;
}
while self.cur()? == C_REVERSE_SOLIDUS {
} else if c == C_REVERSE_SOLIDUS {
self.consume();
if is_new_line(self.cur()?) {
let c2 = self.cur()?;
if is_new_line(c2) {
self.consume();
} else {
} else if are_valid_escape(c, c2) {
self.consume_escaped()?;
if self.cur()? == end {
self.consume();
break 'outer;
}
}
} else {
self.consume();
}
self.consume();
}
visitor.string(self, start, self.cur_pos()?)
}
Expand Down

0 comments on commit 14f99f8

Please sign in to comment.