Revert "remove do expressions"
This reverts commit 420492388b06ff295a638adbea0f34c726056607.
This commit is contained in:
parent
1e77212efa
commit
da9493e1fa
@ -281,6 +281,20 @@ pp.parseExprAtom = function(refShorthandDefaultPos) {
|
||||
case tt._yield:
|
||||
if (this.inGenerator) this.unexpected()
|
||||
|
||||
case tt._do:
|
||||
if (this.options.features["es7.doExpressions"]) {
|
||||
let node = this.startNode()
|
||||
this.next()
|
||||
var oldInFunction = this.inFunction
|
||||
var oldLabels = this.labels
|
||||
this.labels = []
|
||||
this.inFunction = false
|
||||
node.body = this.parseBlock()
|
||||
this.inFunction = oldInFunction
|
||||
this.labels = oldLabels
|
||||
return this.finishNode(node, "DoExpression")
|
||||
}
|
||||
|
||||
case tt.name:
|
||||
let start = this.markPosition()
|
||||
node = this.startNode()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user