JavaScript: Move support for optional catch to ES2019.

This commit is contained in:
Max Schaefer
2019-05-10 08:27:25 +01:00
parent d93d68d7f5
commit 9ec366cf88

View File

@@ -385,7 +385,7 @@ public class ESNextParser extends JSXParser {
param = this.parseBindingAtom();
this.checkLVal(param, true, null);
this.expect(TokenType.parenR);
} else if (!options.esnext()) {
} else if (options.ecmaVersion() < 10) {
this.unexpected();
}
BlockStatement catchBody = this.parseBlock(false);