add do expressions

This commit is contained in:
Sebastian McKenzie 2015-03-22 04:06:15 +11:00
parent 01b39d67f0
commit 6128fd9687

View File

@ -245,6 +245,14 @@ pp.parseExprAtom = function(refShorthandDefaultPos) {
case tt._yield:
if (this.inGenerator) unexpected()
case tt._do:
if (this.options.features["es7.doExpressions"]) {
let node = this.startNode()
this.next()
node.body = this.parseBlock()
return this.finishNode(node, "DoExpression")
}
case tt.name:
let start = this.markPosition()
node = this.startNode()