mirror of
https://github.com/swc-project/swc.git
synced 2024-10-05 04:39:06 +03:00
fix(es/parser): Make UnterminatedBlockComment
stick to the EOF (#9366)
**Related issue:** - https://github.com/wooorm/markdown-rs/pull/120
This commit is contained in:
parent
1d11d8dee9
commit
4f0fc6eb65
6
.changeset/thin-cobras-taste.md
Normal file
6
.changeset/thin-cobras-taste.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
swc_ecma_parser: patch
|
||||
swc_core: patch
|
||||
---
|
||||
|
||||
fix(es/parser): Make `UnterminatedBlockComment` stick to the EOF
|
@ -290,7 +290,8 @@ impl<'a> Lexer<'a> {
|
||||
self.bump();
|
||||
}
|
||||
|
||||
let span = Span::new(start, self.input.end_pos());
|
||||
let end = self.input.end_pos();
|
||||
let span = Span::new(end, end);
|
||||
self.emit_error_span(span, SyntaxError::UnterminatedBlockComment)
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
x Unterminated block comment
|
||||
,-[$DIR/tests/test262-parser/fail/025560435ed0b9a6.js:1:1]
|
||||
1 | ,-> /*
|
||||
2 | |
|
||||
3 | `->
|
||||
,-[$DIR/tests/test262-parser/fail/025560435ed0b9a6.js:3:2]
|
||||
3 |
|
||||
`----
|
||||
|
@ -1,5 +1,4 @@
|
||||
x Unterminated block comment
|
||||
,-[$DIR/tests/test262-parser/fail/100c329e6dd70e5a.js:1:1]
|
||||
1 | /*
|
||||
: ^^^
|
||||
`----
|
||||
|
@ -1,5 +1,4 @@
|
||||
x Unterminated block comment
|
||||
,-[$DIR/tests/test262-parser/fail/1c6ba8177a9624f0.js:1:1]
|
||||
,-[$DIR/tests/test262-parser/fail/1c6ba8177a9624f0.js:1:5]
|
||||
1 | /*
|
||||
: ^^^
|
||||
`----
|
||||
|
@ -1,6 +1,5 @@
|
||||
x Unterminated block comment
|
||||
,-[$DIR/tests/test262-parser/fail/65a7e95d594ad7ad.js:1:1]
|
||||
1 | ,-> /*
|
||||
2 | |
|
||||
3 | `-> *
|
||||
,-[$DIR/tests/test262-parser/fail/65a7e95d594ad7ad.js:3:1]
|
||||
2 |
|
||||
3 | *
|
||||
`----
|
||||
|
@ -1,5 +1,4 @@
|
||||
x Unterminated block comment
|
||||
,-[$DIR/tests/test262-parser/fail/766e0153d3f7ec95.js:1:1]
|
||||
1 | /*
|
||||
: ^^
|
||||
`----
|
||||
|
@ -1,5 +1,4 @@
|
||||
x Unterminated block comment
|
||||
,-[$DIR/tests/test262-parser/fail/86308fd40fa95e9d.js:1:1]
|
||||
1 | /*hello
|
||||
: ^^^^^^^
|
||||
`----
|
||||
|
@ -1,5 +1,4 @@
|
||||
x Unterminated block comment
|
||||
,-[$DIR/tests/test262-parser/fail/8d64a30d9de151b6.js:1:1]
|
||||
1 | /**
|
||||
: ^^^
|
||||
`----
|
||||
|
@ -1,5 +1,4 @@
|
||||
x Unterminated block comment
|
||||
,-[$DIR/tests/test262-parser/fail/ac1ee2739ad30d66.js:1:1]
|
||||
0 | /*
|
||||
: ^^
|
||||
`----
|
||||
|
@ -1,5 +1,4 @@
|
||||
x Unterminated block comment
|
||||
,-[$DIR/tests/test262-parser/fail/d056300d8658429f.js:1:1]
|
||||
1 | /*
|
||||
: ^^^
|
||||
`----
|
||||
|
@ -1,5 +1,4 @@
|
||||
x Unterminated block comment
|
||||
,-[$DIR/tests/test262-parser/fail/e2cdddda85e8ffe1.js:1:1]
|
||||
1 | /*hello *
|
||||
: ^^^^^^^^^^
|
||||
`----
|
||||
|
Loading…
Reference in New Issue
Block a user