e2fe203adc
Change-Id: I582f956cd4b712203c2f6dd630b4e1384040446d Tested: analysis clean (this is a lint only related change) Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329400 Reviewed-by: Phil Quitslund <pquitslund@google.com> Reviewed-by: Samuel Rawlins <srawlins@google.com> Commit-Queue: Devon Carew <devoncarew@google.com>
32 lines
1.1 KiB
Dart
32 lines
1.1 KiB
Dart
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
// ignore_for_file: constant_identifier_names
|
|
|
|
/// Codes that transformed sync*/async/async* functions use to communicate with
|
|
/// js_helper functions.
|
|
library;
|
|
|
|
const int SUCCESS = 0;
|
|
const int ERROR = 1;
|
|
const int STREAM_WAS_CANCELED = 2;
|
|
|
|
// A sync* function transformed 'body' returns the following codes to
|
|
// communicate the updated state of the `_SyncStarIterator` (Iterator).
|
|
|
|
/// The sync* body has terminated. The body should not be called again.
|
|
const int SYNC_STAR_DONE = 0;
|
|
|
|
/// The sync* body has updated the `_current` field of the Iterator with the
|
|
/// value that is yielded.
|
|
const int SYNC_STAR_YIELD = 1;
|
|
|
|
/// The sync* body has updated the Iterator with an Iterable. The elements of
|
|
/// the Iterable are the next values of the Iterator.
|
|
const int SYNC_STAR_YIELD_STAR = 2;
|
|
|
|
/// The sync* body throws an exception. The exception has been stored on a field
|
|
/// of the Iterator.
|
|
const int SYNC_STAR_UNCAUGHT_EXCEPTION = 3;
|