OLD | NEW |
(Empty) | |
| 1 dart_library.library('syncstar_syntax', null, /* Imports */[ |
| 2 "dart_runtime/dart", |
| 3 'dart/core' |
| 4 ], /* Lazy imports */[ |
| 5 ], function(exports, dart, core) { |
| 6 'use strict'; |
| 7 let dartx = dart.dartx; |
| 8 function* foo() { |
| 9 yield 1; |
| 10 yield* dart.list([2, 3], core.int); |
| 11 } |
| 12 dart.fn(foo, core.Iterable$(core.int), []); |
| 13 class Class extends core.Object { |
| 14 *bar() { |
| 15 yield 1; |
| 16 yield* dart.list([2, 3], core.int); |
| 17 } |
| 18 static *baz() { |
| 19 yield 1; |
| 20 yield* dart.list([2, 3], core.int); |
| 21 } |
| 22 } |
| 23 dart.setSignature(Class, { |
| 24 methods: () => ({bar: [core.Iterable$(core.int), []]}), |
| 25 statics: () => ({baz: [core.Iterable$(core.int), []]}), |
| 26 names: ['baz'] |
| 27 }); |
| 28 function main() { |
| 29 function* qux() { |
| 30 yield 1; |
| 31 yield* dart.list([2, 3], core.int); |
| 32 } |
| 33 dart.fn(qux, core.Iterable$(core.int), []); |
| 34 foo()[dartx.forEach](core.print); |
| 35 new Class().bar()[dartx.forEach](core.print); |
| 36 Class.baz()[dartx.forEach](core.print); |
| 37 qux()[dartx.forEach](core.print); |
| 38 } |
| 39 dart.fn(main); |
| 40 // Exports: |
| 41 exports.foo = foo; |
| 42 exports.Class = Class; |
| 43 exports.main = main; |
| 44 }); |
OLD | NEW |