You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (state === JSDocState.SavingBackticks // TODO: nextTokenJSDocBig should be able to skip @ inside backticks
8905
-
|| state === JSDocState.SavingComments && (!previousWhitespace || lookAhead(isNextJSDocTokenWhitespace))) {
8906
-
// @ doesn't start a new tag inside ``, and inside a comment, only after whitespace or not before whitespace
8907
-
comments.push(scanner.getTokenText());
8908
-
break;
8909
-
}
8910
8903
scanner.setTextPos(scanner.getTextPos() - 1);
8911
-
// falls through
8904
+
break loop;
8912
8905
case SyntaxKind.EndOfFileToken:
8913
8906
// Done
8914
8907
break loop;
@@ -8965,11 +8958,8 @@ namespace Parser {
8965
8958
pushComment(scanner.getTokenText());
8966
8959
break;
8967
8960
}
8968
-
// TODO: nextTokenJSDocBig always returns Identifier, even when that token ends with some whitespace.
8969
-
// Make this hack less hacky: call a isWhitespace function, and importantly, the state *currently* being SavingComments doesn't mean that the previous call was for a big token
if (state === JSDocState.SavingComments || state === JSDocState.SavingBackticks) { // TODO: Add another scanner method for scanning over the introductory " *" after BeginningOfLine
8972
-
tok = nextTokenJSDocBig(); // TODO: Maybe SawAsterisk could also call nextTokenJSDocBig?
8962
+
tok = nextTokenJSDocBig(state === JSDocState.SavingBackticks); // TODO: Maybe SawAsterisk could also call nextTokenJSDocBig?
8973
8963
} // TODO: Maybe nextTokenJSDocBig is backward-compatible enough to just call all the time
8974
8964
else {
8975
8965
tok = nextTokenJSDoc();
@@ -8989,11 +8979,6 @@ namespace Parser {
8989
8979
}
8990
8980
}
8991
8981
8992
-
function isNextJSDocTokenWhitespace() {
8993
-
const next = nextTokenJSDoc();
8994
-
return next === SyntaxKind.WhitespaceTrivia || next === SyntaxKind.NewLineTrivia;
0 commit comments