Skip to content

Commit 9ec366c

Browse files
author
Max Schaefer
committed
JavaScript: Move support for optional catch to ES2019.
1 parent d93d68d commit 9ec366c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

javascript/extractor/src/com/semmle/jcorn/ESNextParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ protected CatchClause parseCatchClause(Position startLoc) {
385385
param = this.parseBindingAtom();
386386
this.checkLVal(param, true, null);
387387
this.expect(TokenType.parenR);
388-
} else if (!options.esnext()) {
388+
} else if (options.ecmaVersion() < 10) {
389389
this.unexpected();
390390
}
391391
BlockStatement catchBody = this.parseBlock(false);

0 commit comments

Comments
 (0)