Merge branch 'master' of github.com:babel/babel

This commit is contained in:
Sebastian McKenzie
2015-04-12 20:59:26 -07:00
10 changed files with 129 additions and 2 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -0,0 +1,7 @@
export var metadata = {
stage: 1
};
export function check() {
return false;
}

View File

@@ -1,5 +1,6 @@
export default {
"es7.classProperties": require("./es7/class-properties"),
"es7.trailingFunctionCommas": require("./es7/trailing-function-commas"),
"es7.asyncFunctions": require("./es7/async-functions"),
"es7.decorators": require("./es7/decorators"),