diff --git a/src/expression.js b/src/expression.js index 7d62e0cc90..b84117e756 100755 --- a/src/expression.js +++ b/src/expression.js @@ -226,7 +226,7 @@ pp.parseSubscripts = function(base, start, noCalls) { } else if (!noCalls && this.eat(tt.parenL)) { let node = this.startNodeAt(start) node.callee = base - node.arguments = this.parseExprList(tt.parenR, false) + node.arguments = this.parseExprList(tt.parenR, this.options.features["es7.trailingFunctionCommas"]) return this.parseSubscripts(this.finishNode(node, "CallExpression"), start, noCalls) } else if (this.type === tt.backQuote) { let node = this.startNodeAt(start) diff --git a/src/statement.js b/src/statement.js index 35104336d9..9490e25e3c 100755 --- a/src/statement.js +++ b/src/statement.js @@ -458,7 +458,7 @@ pp.parseFunction = function(node, isStatement, allowExpressionBody, isAsync) { pp.parseFunctionParams = function(node) { this.expect(tt.parenL) - node.params = this.parseBindingList(tt.parenR, false, false) + node.params = this.parseBindingList(tt.parenR, false, this.options.features["es7.trailingFunctionCommas"]) } // Parse a class declaration or literal (depending on the