Skip to content

Commit

Permalink
Revert "fix: bail out only when they could form bitshift"
Browse files Browse the repository at this point in the history
This reverts commit c413671.
  • Loading branch information
JLHwung committed Aug 27, 2022
1 parent 90aab8e commit 3fb64ae
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 109 deletions.
9 changes: 4 additions & 5 deletions packages/babel-parser/src/plugins/typescript/index.ts
Expand Up @@ -2506,11 +2506,10 @@ export default (superClass: ClassWithMixin<typeof Parser, IJSXParserMixin>) =>

const tokenType = this.state.type;
if (
(this.state.start === this.state.lastTokStart + 1 &&
// a<b>>c is not (a<b>)>c, but a<(b>>c)
(tokenType === tt.gt ||
// a<b>>>c is not (a<b>)>>c, but a<(b>>>c)
tokenType === tt.bitShiftR)) ||
// a<b>>c is not (a<b>)>c, but a<(b>>c)
tokenType === tt.gt ||
// a<b>>>c is not (a<b>)>>c, but a<(b>>>c)
tokenType === tt.bitShiftR ||
// a<b>c is (a<b)>c
(tokenType !== tt.parenL &&
tokenCanStartExpression(tokenType) &&
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 3fb64ae

Please sign in to comment.