This commit is contained in:
Brian Ng
2018-11-09 15:25:13 -06:00
committed by GitHub
parent 504b331da4
commit 4f206b2416
24 changed files with 49 additions and 63 deletions

View File

@@ -332,8 +332,8 @@ export default class ExpressionParser extends LValParser {
this.finishNode(
node,
op === tt.logicalOR ||
op === tt.logicalAND ||
op === tt.nullishCoalescing
op === tt.logicalAND ||
op === tt.nullishCoalescing
? "LogicalExpression"
: "BinaryExpression",
);

View File

@@ -619,8 +619,8 @@ export default class StatementParser extends ExpressionParser {
const kind = this.state.type.isLoop
? "loop"
: this.match(tt._switch)
? "switch"
: null;
? "switch"
: null;
for (let i = this.state.labels.length - 1; i >= 0; i--) {
const label = this.state.labels[i];
if (label.statementStart === node.start) {