Skip to content

Commit 1c4dc31

Browse files
committed
ConflictMarker
1 parent fcf1afb commit 1c4dc31

File tree

1 file changed

+4
-9
lines changed
  • crates/swc_ecma_parser/src/lexer

1 file changed

+4
-9
lines changed

Diff for: crates/swc_ecma_parser/src/lexer/mod.rs

+4-9
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,7 @@ impl<'a> Lexer<'a> {
188188
return self.read_token(start);
189189
}
190190

191-
RawToken::LConflictMarker | RawToken::RConflictMarker
192-
if self.had_line_break_before_last() =>
193-
{
191+
RawToken::LConflictMarker | RawToken::RConflictMarker => {
194192
// All conflict markers consist of the same character repeated seven times.
195193
// If it is a <<<<<<< or >>>>>>> marker then it is also followed by a space.
196194
// <<<<<<<
@@ -199,8 +197,8 @@ impl<'a> Lexer<'a> {
199197
// ^
200198

201199
self.emit_error_span(fixed_len_span(*start, 7), SyntaxError::TS1185);
202-
// self.skip_line_comment(5);
203-
// self.skip_space::<true>();
200+
let _ = self.input.next();
201+
204202
*start = self.input.cur_pos();
205203
return self.read_token(start);
206204
}
@@ -326,10 +324,7 @@ impl<'a> Lexer<'a> {
326324
*start = self.input.cur_pos();
327325
return self.read_token(start);
328326
}
329-
RawToken::LineComment
330-
| RawToken::BlockComment
331-
| RawToken::LConflictMarker
332-
| RawToken::RConflictMarker => {
327+
RawToken::LineComment | RawToken::BlockComment => {
333328
self.input.next().transpose()?;
334329
// self.skip_space::<true>()?;
335330

0 commit comments

Comments
 (0)