Skip to content

Commit

Permalink
Fix the "no-lonely-if" lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tucan9389 committed May 1, 2023
1 parent e068556 commit 7fac327
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions source/mlir.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,23 +245,21 @@ mlir.Tokenizer = class {
} else {
break;
}
} else { // opened
if (!this.currentChar) {
} else if (!this.currentChar) {
break;
} else if (this.currentChar === '>') {
result += this.currentChar;
this.advance();
opened -= 1;
if (opened === 0) {
break;
} else if (this.currentChar === '>') {
result += this.currentChar;
this.advance();
opened -= 1;
if (opened === 0) {
break;
}
} else {
if (this.currentChar === '<') {
opened += 1;
}
result += this.currentChar;
this.advance();
}
} else {
if (this.currentChar === '<') {
opened += 1;
}
result += this.currentChar;
this.advance();
}
}

Expand Down

0 comments on commit 7fac327

Please sign in to comment.