mirror of
https://github.com/dart-lang/sdk
synced 2024-10-07 09:11:55 +00:00
Fix grammar
Fixes #50509 TEST=ci Change-Id: I7ca115bbe6f436e9df126afddcc08eaba79af2f3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270740 Commit-Queue: Sigmund Cherem <sigmund@google.com> Reviewed-by: Lasse Nielsen <lrn@google.com> Reviewed-by: Derek Xu <derekx@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com>
This commit is contained in:
parent
3556eb571e
commit
9bea89246a
|
@ -581,7 +581,7 @@ class SuggestionBuilder {
|
|||
);
|
||||
}
|
||||
|
||||
/// Add a suggestion for a [element]. If the class can only be
|
||||
/// Add a suggestion for an [element]. If the class can only be
|
||||
/// referenced using a prefix, then the [prefix] should be provided.
|
||||
void suggestInterface(InterfaceElement element, {String? prefix}) {
|
||||
var relevance = _computeTopLevelRelevance(element,
|
||||
|
|
|
@ -80,7 +80,7 @@ abstract class AugmentationImportElement implements _ExistingElement {
|
|||
/// Clients may not extend, implement or mix-in this class.
|
||||
abstract class AugmentedClassElement implements AugmentedInterfaceElement {}
|
||||
|
||||
/// The result of applying augmentations to a [EnumElement].
|
||||
/// The result of applying augmentations to an [EnumElement].
|
||||
///
|
||||
/// Clients may not extend, implement or mix-in this class.
|
||||
abstract class AugmentedEnumElement implements AugmentedInterfaceElement {}
|
||||
|
@ -1092,7 +1092,7 @@ abstract class ElementVisitor<R> {
|
|||
abstract class EnumAugmentationElement implements EnumOrAugmentationElement {
|
||||
/// Returns the element that is augmented by this augmentation; or `null` if
|
||||
/// there is no corresponding element to be augmented. The chain of
|
||||
/// augmentations should normally end with a [EnumElement], but might end
|
||||
/// augmentations should normally end with an [EnumElement], but might end
|
||||
/// with `null` immediately or after a few intermediate
|
||||
/// [EnumAugmentationElement]s in case of invalid code when an augmentation
|
||||
/// is declared without the corresponding enum declaration.
|
||||
|
|
|
@ -252,7 +252,7 @@ class AnalysisDriver implements AnalysisDriverGeneric {
|
|||
/// Create a new instance of [AnalysisDriver].
|
||||
///
|
||||
/// The given [SourceFactory] is cloned to ensure that it does not contain a
|
||||
/// reference to a [AnalysisContext] in which it could have been used.
|
||||
/// reference to an [AnalysisContext] in which it could have been used.
|
||||
AnalysisDriver({
|
||||
required AnalysisDriverScheduler scheduler,
|
||||
required PerformanceLog logger,
|
||||
|
|
|
@ -92,7 +92,7 @@ class AugmentationImportWithFile
|
|||
importedFile.referencingFiles.add(container.file);
|
||||
}
|
||||
|
||||
/// If [importedFile] is a [AugmentationFileKind], and it confirms that
|
||||
/// If [importedFile] is an [AugmentationFileKind], and it confirms that
|
||||
/// it is an augmentation of the [container], returns the [importedFile].
|
||||
AugmentationFileKind? get importedAugmentation {
|
||||
final kind = importedFile.kind;
|
||||
|
|
|
@ -355,7 +355,7 @@ class FunctionElementLinkedData extends ElementLinkedData<FunctionElementImpl> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Not a [ElementLinkedData], just a bundle with data.
|
||||
/// Not an [ElementLinkedData], just a bundle with data.
|
||||
class LibraryAugmentationElementLinkedData {
|
||||
final int offset;
|
||||
ApplyConstantOffsets? applyConstantOffsets;
|
||||
|
|
|
@ -31,7 +31,7 @@ abstract class OperationPerformance {
|
|||
});
|
||||
}
|
||||
|
||||
/// The data attachment for a [OperationPerformance].
|
||||
/// The data attachment for an [OperationPerformance].
|
||||
abstract class OperationPerformanceData<T> {
|
||||
String get name;
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ import 'universe/resolution_world_builder.dart';
|
|||
import 'universe/world_impact.dart' show WorldImpact, WorldImpactBuilderImpl;
|
||||
import 'compiler_migrated.dart';
|
||||
|
||||
/// Implementation of the compiler using a [api.CompilerInput] for supplying
|
||||
/// Implementation of the compiler using a [api.CompilerInput] for supplying
|
||||
/// the sources.
|
||||
class Compiler
|
||||
implements
|
||||
|
|
|
@ -33,7 +33,7 @@ class AlgorithmState {
|
|||
this.importSets, this.registry)
|
||||
: queue = WorkQueue(importSets, registry);
|
||||
|
||||
/// Factory function to create and initialize a [AlgorithmState].
|
||||
/// Factory function to create and initialize an [AlgorithmState].
|
||||
factory AlgorithmState.create(
|
||||
FunctionEntity main,
|
||||
Compiler compiler,
|
||||
|
|
|
@ -306,7 +306,7 @@ EnumSet<PragmaAnnotation> processMemberAnnotations(
|
|||
}
|
||||
|
||||
abstract class AnnotationsData {
|
||||
/// Deserializes a [AnnotationsData] object from [source].
|
||||
/// Deserializes an [AnnotationsData] object from [source].
|
||||
factory AnnotationsData.readFromDataSource(
|
||||
CompilerOptions options,
|
||||
DiagnosticReporter reporter,
|
||||
|
|
|
@ -37,7 +37,7 @@ class OrderedTypeSet {
|
|||
|
||||
OrderedTypeSet._(this._levels, this.types);
|
||||
|
||||
/// Deserializes a [OrderedTypeSet] object from [source].
|
||||
/// Deserializes an [OrderedTypeSet] object from [source].
|
||||
factory OrderedTypeSet.readFromDataSource(DataSourceReader source) {
|
||||
// TODO(johnniwinther): Make the deserialized type sets share their
|
||||
// internal links like the original type sets do?
|
||||
|
|
|
@ -98,20 +98,20 @@ abstract class Generator {
|
|||
/// The source uri for use in error messaging.
|
||||
Uri get _uri => _helper.uri;
|
||||
|
||||
/// Builds a [Expression] representing a read from the generator.
|
||||
/// Builds an [Expression] representing a read from the generator.
|
||||
///
|
||||
/// The read of this subexpression does _not_ need to support a simultaneous
|
||||
/// write of the same subexpression.
|
||||
Expression buildSimpleRead();
|
||||
|
||||
/// Builds a [Expression] representing an assignment with the generator on
|
||||
/// Builds an [Expression] representing an assignment with the generator on
|
||||
/// the LHS and [value] on the RHS.
|
||||
///
|
||||
/// The returned expression evaluates to the assigned value, unless
|
||||
/// [voidContext] is true, in which case it may evaluate to anything.
|
||||
Expression buildAssignment(Expression value, {bool voidContext = false});
|
||||
|
||||
/// Returns a [Expression] representing a null-aware assignment (`??=`) with
|
||||
/// Returns an [Expression] representing a null-aware assignment (`??=`) with
|
||||
/// the generator on the LHS and [value] on the RHS.
|
||||
///
|
||||
/// The returned expression evaluates to the assigned value, unless
|
||||
|
@ -121,7 +121,7 @@ abstract class Generator {
|
|||
Expression buildIfNullAssignment(Expression value, DartType type, int offset,
|
||||
{bool voidContext = false});
|
||||
|
||||
/// Returns a [Expression] representing a compound assignment (e.g. `+=`)
|
||||
/// Returns an [Expression] representing a compound assignment (e.g. `+=`)
|
||||
/// with the generator on the LHS and [value] on the RHS.
|
||||
Expression buildCompoundAssignment(Name binaryOperator, Expression value,
|
||||
{int offset = TreeNode.noOffset,
|
||||
|
@ -129,7 +129,7 @@ abstract class Generator {
|
|||
bool isPreIncDec = false,
|
||||
bool isPostIncDec = false});
|
||||
|
||||
/// Returns a [Expression] representing a pre-increment or pre-decrement of
|
||||
/// Returns an [Expression] representing a pre-increment or pre-decrement of
|
||||
/// the generator.
|
||||
Expression buildPrefixIncrement(Name binaryOperator,
|
||||
{int offset = TreeNode.noOffset, bool voidContext = false}) {
|
||||
|
@ -143,7 +143,7 @@ abstract class Generator {
|
|||
isPreIncDec: true);
|
||||
}
|
||||
|
||||
/// Returns a [Expression] representing a post-increment or post-decrement of
|
||||
/// Returns an [Expression] representing a post-increment or post-decrement of
|
||||
/// the generator.
|
||||
Expression buildPostfixIncrement(Name binaryOperator,
|
||||
{int offset = TreeNode.noOffset, bool voidContext = false});
|
||||
|
@ -154,7 +154,7 @@ abstract class Generator {
|
|||
Generator buildIndexedAccess(Expression index, Token token,
|
||||
{required bool isNullAware});
|
||||
|
||||
/// Returns a [Expression] representing a compile-time error.
|
||||
/// Returns an [Expression] representing a compile-time error.
|
||||
///
|
||||
/// At runtime, an exception will be thrown.
|
||||
Expression _makeInvalidRead(UnresolvedKind unresolvedKind) {
|
||||
|
@ -162,7 +162,7 @@ abstract class Generator {
|
|||
kind: unresolvedKind);
|
||||
}
|
||||
|
||||
/// Returns a [Expression] representing a compile-time error wrapping
|
||||
/// Returns an [Expression] representing a compile-time error wrapping
|
||||
/// [value].
|
||||
///
|
||||
/// At runtime, [value] will be evaluated before throwing an exception.
|
||||
|
@ -1844,7 +1844,7 @@ class ExtensionInstanceAccessGenerator extends Generator {
|
|||
}
|
||||
}
|
||||
|
||||
/// A [ExplicitExtensionInstanceAccessGenerator] represents a subexpression
|
||||
/// An [ExplicitExtensionInstanceAccessGenerator] represents a subexpression
|
||||
/// whose prefix is a forced extension instance member access.
|
||||
///
|
||||
/// For instance
|
||||
|
@ -2556,7 +2556,7 @@ class ExplicitExtensionIndexedAccessGenerator extends Generator {
|
|||
}
|
||||
}
|
||||
|
||||
/// A [ExplicitExtensionAccessGenerator] represents a subexpression whose
|
||||
/// An [ExplicitExtensionAccessGenerator] represents a subexpression whose
|
||||
/// prefix is an explicit extension application.
|
||||
///
|
||||
/// For instance
|
||||
|
|
|
@ -290,8 +290,8 @@ abstract class _State extends Response {
|
|||
final String _type;
|
||||
}
|
||||
|
||||
/// A [HttpTimelineLoggingState] provides information about the current state of HTTP
|
||||
/// request logging for a given isolate.
|
||||
/// An [HttpTimelineLoggingState] provides information about the current state
|
||||
/// of HTTP request logging for a given isolate.
|
||||
class HttpTimelineLoggingState extends _State {
|
||||
static HttpTimelineLoggingState? parse(Map<String, dynamic>? json) =>
|
||||
json == null ? null : HttpTimelineLoggingState._fromJson(json);
|
||||
|
@ -499,7 +499,8 @@ class HttpProfileRequestData {
|
|||
|
||||
/// Returns `true` if an error has occurred while issuing the request.
|
||||
///
|
||||
/// If `true`, attempting to access some fields will throw a [HttpProfileRequestError].
|
||||
/// If `true`, attempting to access some fields will throw an
|
||||
/// [HttpProfileRequestError].
|
||||
bool get hasError => error != null;
|
||||
|
||||
/// Information about the client connection.
|
||||
|
@ -586,7 +587,7 @@ class HttpProfileRequestError implements Error {
|
|||
String toString() => 'HttpProfileRequestError: $error.';
|
||||
}
|
||||
|
||||
/// Proxy authentication details associated with a [HttpProfileRequest].
|
||||
/// Proxy authentication details associated with an [HttpProfileRequest].
|
||||
class HttpProfileProxyData {
|
||||
static HttpProfileProxyData? parse(Map<String, dynamic>? json) =>
|
||||
json == null ? null : HttpProfileProxyData._fromJson(json);
|
||||
|
@ -738,7 +739,8 @@ class SocketProfilingState extends _State {
|
|||
: super._fromJson(json);
|
||||
}
|
||||
|
||||
/// A [SpawnedProcessRef] contains identifying information about a spawned process.
|
||||
/// A [SpawnedProcessRef] contains identifying information about a spawned
|
||||
/// process.
|
||||
class SpawnedProcessRef {
|
||||
static SpawnedProcessRef? parse(Map<String, dynamic>? json) =>
|
||||
json == null ? null : SpawnedProcessRef._fromJson(json);
|
||||
|
@ -836,7 +838,8 @@ class SpawnedProcessList extends Response {
|
|||
final List<SpawnedProcessRef> _processes;
|
||||
}
|
||||
|
||||
/// A [OpenFileRef] contains identifying information about a currently opened file.
|
||||
/// An [OpenFileRef] contains identifying information about a currently opened
|
||||
/// file.
|
||||
class OpenFileRef {
|
||||
static OpenFileRef? parse(Map<String, dynamic>? json) =>
|
||||
json == null ? null : OpenFileRef._fromJson(json);
|
||||
|
|
|
@ -894,7 +894,7 @@ FlowGraph* StreamingFlowGraphBuilder::BuildGraph() {
|
|||
|
||||
const Function& function = parsed_function()->function();
|
||||
|
||||
// Setup a [ActiveClassScope] and a [ActiveMemberScope] which will be used
|
||||
// Setup an [ActiveClassScope] and an [ActiveMemberScope] which will be used
|
||||
// e.g. for type translation.
|
||||
const Class& klass =
|
||||
Class::Handle(zone_, parsed_function()->function().Owner());
|
||||
|
|
|
@ -52,7 +52,7 @@ ScopeBuildingResult* ScopeBuilder::BuildScopes() {
|
|||
|
||||
const Function& function = parsed_function_->function();
|
||||
|
||||
// Setup a [ActiveClassScope] and a [ActiveMemberScope] which will be used
|
||||
// Setup an [ActiveClassScope] and an [ActiveMemberScope] which will be used
|
||||
// e.g. for type translation.
|
||||
const Class& klass = Class::Handle(Z, function.Owner());
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ extension Utf8InArena on String {
|
|||
/// If 'string' contains NULL bytes, the converted string will be truncated
|
||||
/// prematurely. See [Utf8Encoder] for details on encoding.
|
||||
///
|
||||
/// Returns a [allocator]-allocated pointer to the result.
|
||||
/// Returns an [allocator]-allocated pointer to the result.
|
||||
Pointer<Utf8> toUtf8(Allocator allocator) {
|
||||
final units = utf8.encode(this);
|
||||
final Pointer<Uint8> result = allocator<Uint8>(units.length + 1);
|
||||
|
|
|
@ -269,7 +269,7 @@ abstract class HttpServer implements Stream<HttpRequest> {
|
|||
/// The default timeout is 20 minutes.
|
||||
set sessionTimeout(int timeout);
|
||||
|
||||
/// A [HttpConnectionsInfo] object summarizing the number of
|
||||
/// An [HttpConnectionsInfo] object summarizing the number of
|
||||
/// current connections handled by the server.
|
||||
HttpConnectionsInfo connectionsInfo();
|
||||
}
|
||||
|
@ -1070,7 +1070,7 @@ abstract class HttpResponse implements IOSink {
|
|||
/// ## Making a simple GET request: an example
|
||||
///
|
||||
/// A `getUrl` request is a two-step process, triggered by two [Future]s.
|
||||
/// When the first future completes with a [HttpClientRequest], the underlying
|
||||
/// When the first future completes with an [HttpClientRequest], the underlying
|
||||
/// network connection has been established, but no data has been sent.
|
||||
/// In the callback function for the first future, the HTTP headers and body
|
||||
/// can be set on the request. Either the first write to the request object
|
||||
|
@ -1723,7 +1723,7 @@ abstract class HttpClientRequest implements IOSink {
|
|||
/// Cookies to present to the server (in the 'cookie' header).
|
||||
List<Cookie> get cookies;
|
||||
|
||||
/// A [HttpClientResponse] future that will complete once the response is
|
||||
/// An [HttpClientResponse] future that will complete once the response is
|
||||
/// available.
|
||||
///
|
||||
/// If an error occurs before the response is available, this future will
|
||||
|
@ -1770,7 +1770,7 @@ abstract class HttpClientRequest implements IOSink {
|
|||
|
||||
/// HTTP response for a client connection.
|
||||
///
|
||||
/// The body of a [HttpClientResponse] object is a [Stream] of data from the
|
||||
/// The body of an [HttpClientResponse] object is a [Stream] of data from the
|
||||
/// server. Use [Stream] methods like [`transform`][Stream.transform] and
|
||||
/// [`join`][Stream.join] to access the data.
|
||||
///
|
||||
|
|
|
@ -227,7 +227,7 @@ abstract class WebSocketTransformer
|
|||
return _WebSocketTransformerImpl(protocolSelector, compression);
|
||||
}
|
||||
|
||||
/// Upgrades a [HttpRequest] to a [WebSocket] connection. If the
|
||||
/// Upgrades an [HttpRequest] to a [WebSocket] connection. If the
|
||||
/// request is not a valid WebSocket upgrade request an HTTP response
|
||||
/// with status code 500 will be returned. Otherwise the returned
|
||||
/// future will complete with the [WebSocket] when the upgrade process
|
||||
|
|
|
@ -18599,7 +18599,7 @@ class HttpRequest extends HttpRequestEventTarget {
|
|||
* Length of time in milliseconds before a request is automatically
|
||||
* terminated.
|
||||
*
|
||||
* When the time has passed, a [HttpRequestEventTarget.timeoutEvent] is
|
||||
* When the time has passed, an [HttpRequestEventTarget.timeoutEvent] is
|
||||
* dispatched.
|
||||
*
|
||||
* If [timeout] is set to 0, then the request will not time out.
|
||||
|
|
|
@ -4384,7 +4384,7 @@
|
|||
" * Length of time in milliseconds before a request is automatically",
|
||||
" * terminated.",
|
||||
" *",
|
||||
" * When the time has passed, a [HttpRequestEventTarget.timeoutEvent] is",
|
||||
" * When the time has passed, an [HttpRequestEventTarget.timeoutEvent] is",
|
||||
" * dispatched.",
|
||||
" *",
|
||||
" * If [timeout] is set to 0, then the request will not time out.",
|
||||
|
|
Loading…
Reference in a new issue