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 8282 Precedence = {
8383 Sequence : 0 ,
8484 Yield : 1 ,
85- Await : 1 ,
8685 Assignment : 1 ,
8786 Conditional : 2 ,
8887 ArrowFunction : 2 ,
9695 BitwiseSHIFT : 10 ,
9796 Additive : 11 ,
9897 Multiplicative : 12 ,
98+ Await : 13 ,
9999 Unary : 13 ,
100100 Postfix : 14 ,
101101 Call : 15 ,
Original file line number Diff line number Diff line change @@ -5927,6 +5927,46 @@ data = {
59275927 }
59285928 } ,
59295929
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+
59305970 'f(async function (promise) {\n await promise;\n});' : {
59315971 generateFrom : {
59325972 "type" : "ExpressionStatement" ,
You can’t perform that action at this time.
0 commit comments