Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sandersn committed Mar 3, 2023
1 parent f8f9721 commit 3d96fa9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/compiler/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8703,9 +8703,9 @@ namespace Parser {

function removeTrailingWhitespace(comments: string[]) {
while (comments.length) { // TODO: Bad code is still bad; should operate on an entire string
const trimmed = comments[comments.length - 1].trim()
const trimmed = comments[comments.length - 1].trim();
if (trimmed === "") {
comments.pop()
comments.pop();
}
else if (trimmed.length < comments[comments.length - 1].length) {
comments[comments.length - 1] = comments[comments.length - 1].trimEnd();
Expand Down Expand Up @@ -8922,7 +8922,7 @@ namespace Parser {
if (margin !== undefined && indent + whitespace.length > margin) {
comments.push(whitespace.slice(margin - indent));
}
indent += whitespace.length; // TODO: What happens if we start saving comments here? We don't support margins like | * text text | do we?
indent += whitespace.length; // TODO: What happens if we start saving comments here? We don't support margins like | <margin here> * text text | do we?
}
break;
case SyntaxKind.OpenBraceToken:
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2469,7 +2469,7 @@ export function createScanner(languageVersion: ScriptTarget,
while (pos < end) {
if (ch !== CharacterCodes.lineFeed && ch !== CharacterCodes.at && ch !== CharacterCodes.backtick && ch !== CharacterCodes.openBrace) {
// TODO: We can also be smarter about openBrace, backtick and at by looking at a tiny amount of context
pos++
pos++;
}
else {
break;
Expand Down

0 comments on commit 3d96fa9

Please sign in to comment.