dart-sdk/tools/verify_docs/bin
Lasse R.H. Nielsen 44baaf13b6 Allow code samples to *continue* a prior sample.
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>
2021-12-02 16:37:57 +00:00
..
verify_docs.dart Allow code samples to *continue* a prior sample. 2021-12-02 16:37:57 +00:00