mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 16:17:55 +00:00
44baaf13b6
We have added more examples, and some of them uses the structure of: ````dart /// ```dart /// var x = something; /// ``` /// and then you can also floo the thing /// ``` /// x.floo(...); /// ``` ```` The following chunks of the same example can now be written as: ````dart /// ```dart continued /// x.floo(...); /// ``` ```` Change handling of imports, and introduce a `top` template different from `none`. The `none` template gets nothing for free. The sample must be completely self-contained. Is triggered by the sample containing a `library` declaration, because we can't add anything before that. The `top` template allows top-level declarations, but does introduce automatic imports and "samples can expect" code if the sample doesn't contain `import`s. Is triggered by top-level declarations other than `library`. Also some restructuring of the code to make this feature easier to implement. Change-Id: If2288147face01efad2ad656aa52183cb4c8b3bf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221343 Commit-Queue: Lasse Nielsen <lrn@google.com> Reviewed-by: Devon Carew <devoncarew@google.com> |
||
---|---|---|
.. | ||
bin | ||
lib | ||
api_readme.md | ||
BUILD.gn |