add do expressions
This commit is contained in:
parent
01b39d67f0
commit
6128fd9687
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user