yield-star.js (1022B)
1 // Copyright (C) 2018 Leo Balter. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 description: > 5 Dynamic Import receives an AssignmentExpression (yield [no LineTerminator here] AssignmentExpression) 6 esid: prod-ImportCall 7 info: | 8 ImportCall [Yield]: 9 import ( AssignmentExpression[+In, ?Yield] ) 10 11 AssignmentExpression[In, Yield, Await]: 12 ConditionalExpression[?In, ?Yield, ?Await] 13 [+Yield]YieldExpression[?In, ?Await] 14 ArrowFunction[?In, ?Yield, ?Await] 15 AsyncArrowFunction[?In, ?Yield, ?Await] 16 LeftHandSideExpression[?Yield, ?Await] = AssignmentExpression[?In, ?Yield, ?Await] 17 LeftHandSideExpression[?Yield, ?Await] AssignmentOperator AssignmentExpression[?In, ?Yield, ?Await] 18 features: [dynamic-import] 19 ---*/ 20 21 // Asserts valid syntax, return is not asserted for the undefined value of yield * 22 function *g() { 23 import(yield * ['Roberta Flack', 'Donny Hathaway', 'Frank Sinatra']); 24 } 25 26 reportCompare(0, 0);