File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3915,7 +3915,7 @@ export function createScanner(
39153915
39163916 if ( isIdentifierStart ( ch , languageVersion ) ) {
39173917 let char = ch ;
3918- while ( pos < end && ( isIdentifierPart ( char = codePointUnchecked ( pos ) , languageVersion ) || char === CharacterCodes . minus ) ) pos += charSize ( char ) ;
3918+ while ( pos < end && isIdentifierPart ( char = codePointUnchecked ( pos ) , languageVersion ) || char === CharacterCodes . minus ) pos += charSize ( char ) ;
39193919 tokenValue = text . substring ( tokenStart , pos ) ;
39203920 if ( char === CharacterCodes . backslash ) {
39213921 tokenValue += scanIdentifierParts ( ) ;
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ describe("comment parsing", () => {
1111 const withTrailing = `;/* comment */
1212// another one
1313` ;
14- const endingInHyphen = "/**comment-*/" ;
1514 it ( "skips shebang" , ( ) => {
1615 const result = ts . getLeadingCommentRanges ( withShebang , 0 ) ;
1716 assert . isDefined ( result ) ;
@@ -30,16 +29,4 @@ describe("comment parsing", () => {
3029 assert . strictEqual ( result . length , 1 ) ;
3130 assert . strictEqual ( result [ 0 ] . kind , ts . SyntaxKind . SingleLineCommentTrivia ) ;
3231 } ) ;
33-
34- it ( "parses /** block comments ending in hyphen" , ( ) => {
35- const sourceFile = ts . createSourceFile (
36- "file.ts" ,
37- `${ endingInHyphen } \nconst x = 1;` ,
38- ts . ScriptTarget . ESNext ,
39- /*setParentNodes*/ true ,
40- ) ;
41-
42- assert . strictEqual ( sourceFile . parseDiagnostics . length , 0 ) ;
43- assert . strictEqual ( sourceFile . statements . length , 1 ) ;
44- } ) ;
4532} ) ;
You can’t perform that action at this time.
0 commit comments