File tree Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change 82
82
Precedence = {
83
83
Sequence : 0 ,
84
84
Yield : 1 ,
85
- Await : 1 ,
86
85
Assignment : 1 ,
87
86
Conditional : 2 ,
88
87
ArrowFunction : 2 ,
96
95
BitwiseSHIFT : 10 ,
97
96
Additive : 11 ,
98
97
Multiplicative : 12 ,
98
+ Await : 13 ,
99
99
Unary : 13 ,
100
100
Postfix : 14 ,
101
101
Call : 15 ,
Original file line number Diff line number Diff line change @@ -5927,6 +5927,46 @@ data = {
5927
5927
}
5928
5928
} ,
5929
5929
5930
+ 'async function test() {\n await (foo ? bar : quux);\n}' : {
5931
+ generateFrom : {
5932
+ "type" : "FunctionDeclaration" ,
5933
+ "id" : {
5934
+ "type" : "Identifier" ,
5935
+ "name" : "test"
5936
+ } ,
5937
+ "params" : [ ] ,
5938
+ "body" : {
5939
+ "type" : "BlockStatement" ,
5940
+ "body" : [
5941
+ {
5942
+ "type" : "ExpressionStatement" ,
5943
+ "expression" : {
5944
+ "type" : "AwaitExpression" ,
5945
+ "argument" : {
5946
+ "type" : "ConditionalExpression" ,
5947
+ "test" : {
5948
+ "type" : "Identifier" ,
5949
+ "name" : "foo"
5950
+ } ,
5951
+ "consequent" : {
5952
+ "type" : "Identifier" ,
5953
+ "name" : "bar"
5954
+ } ,
5955
+ "alternate" : {
5956
+ "type" : "Identifier" ,
5957
+ "name" : "quux"
5958
+ }
5959
+ }
5960
+ }
5961
+ }
5962
+ ]
5963
+ } ,
5964
+ "generator" : false ,
5965
+ "expression" : false ,
5966
+ "async" : true
5967
+ }
5968
+ } ,
5969
+
5930
5970
'f(async function (promise) {\n await promise;\n});' : {
5931
5971
generateFrom : {
5932
5972
"type" : "ExpressionStatement" ,
You can’t perform that action at this time.
0 commit comments