UnaryExpressions are never not prefix

If you look at the spec https://github.com/babel/babel/blob/master/doc/ast/spec.md#unaryexpression
All unary expressions are prefix. We should deprecate this field. But for now let's just default it true.
This commit is contained in:
Amjad Masad 2016-01-20 19:02:04 -08:00
parent f98dd6c76d
commit 6b47447e7a

View File

@ -626,7 +626,7 @@ defineType("UnaryExpression", {
builder: ["operator", "argument", "prefix"],
fields: {
prefix: {
default: false
default: true
},
argument: {
validate: assertNodeType("Expression")