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:
Ahmed Ashour 2022-11-21 20:07:29 +00:00 committed by Commit Queue
parent 3556eb571e
commit 9bea89246a
19 changed files with 40 additions and 37 deletions

View file

@ -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. /// referenced using a prefix, then the [prefix] should be provided.
void suggestInterface(InterfaceElement element, {String? prefix}) { void suggestInterface(InterfaceElement element, {String? prefix}) {
var relevance = _computeTopLevelRelevance(element, var relevance = _computeTopLevelRelevance(element,

View file

@ -80,7 +80,7 @@ abstract class AugmentationImportElement implements _ExistingElement {
/// Clients may not extend, implement or mix-in this class. /// Clients may not extend, implement or mix-in this class.
abstract class AugmentedClassElement implements AugmentedInterfaceElement {} 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. /// Clients may not extend, implement or mix-in this class.
abstract class AugmentedEnumElement implements AugmentedInterfaceElement {} abstract class AugmentedEnumElement implements AugmentedInterfaceElement {}
@ -1092,7 +1092,7 @@ abstract class ElementVisitor<R> {
abstract class EnumAugmentationElement implements EnumOrAugmentationElement { abstract class EnumAugmentationElement implements EnumOrAugmentationElement {
/// Returns the element that is augmented by this augmentation; or `null` if /// Returns the element that is augmented by this augmentation; or `null` if
/// there is no corresponding element to be augmented. The chain of /// 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 /// with `null` immediately or after a few intermediate
/// [EnumAugmentationElement]s in case of invalid code when an augmentation /// [EnumAugmentationElement]s in case of invalid code when an augmentation
/// is declared without the corresponding enum declaration. /// is declared without the corresponding enum declaration.

View file

@ -252,7 +252,7 @@ class AnalysisDriver implements AnalysisDriverGeneric {
/// Create a new instance of [AnalysisDriver]. /// Create a new instance of [AnalysisDriver].
/// ///
/// The given [SourceFactory] is cloned to ensure that it does not contain a /// 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({ AnalysisDriver({
required AnalysisDriverScheduler scheduler, required AnalysisDriverScheduler scheduler,
required PerformanceLog logger, required PerformanceLog logger,

View file

@ -92,7 +92,7 @@ class AugmentationImportWithFile
importedFile.referencingFiles.add(container.file); 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]. /// it is an augmentation of the [container], returns the [importedFile].
AugmentationFileKind? get importedAugmentation { AugmentationFileKind? get importedAugmentation {
final kind = importedFile.kind; final kind = importedFile.kind;

View file

@ -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 { class LibraryAugmentationElementLinkedData {
final int offset; final int offset;
ApplyConstantOffsets? applyConstantOffsets; ApplyConstantOffsets? applyConstantOffsets;

View file

@ -31,7 +31,7 @@ abstract class OperationPerformance {
}); });
} }
/// The data attachment for a [OperationPerformance]. /// The data attachment for an [OperationPerformance].
abstract class OperationPerformanceData<T> { abstract class OperationPerformanceData<T> {
String get name; String get name;

View file

@ -77,7 +77,7 @@ import 'universe/resolution_world_builder.dart';
import 'universe/world_impact.dart' show WorldImpact, WorldImpactBuilderImpl; import 'universe/world_impact.dart' show WorldImpact, WorldImpactBuilderImpl;
import 'compiler_migrated.dart'; 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. /// the sources.
class Compiler class Compiler
implements implements

View file

@ -33,7 +33,7 @@ class AlgorithmState {
this.importSets, this.registry) this.importSets, this.registry)
: queue = WorkQueue(importSets, registry); : queue = WorkQueue(importSets, registry);
/// Factory function to create and initialize a [AlgorithmState]. /// Factory function to create and initialize an [AlgorithmState].
factory AlgorithmState.create( factory AlgorithmState.create(
FunctionEntity main, FunctionEntity main,
Compiler compiler, Compiler compiler,

View file

@ -306,7 +306,7 @@ EnumSet<PragmaAnnotation> processMemberAnnotations(
} }
abstract class AnnotationsData { abstract class AnnotationsData {
/// Deserializes a [AnnotationsData] object from [source]. /// Deserializes an [AnnotationsData] object from [source].
factory AnnotationsData.readFromDataSource( factory AnnotationsData.readFromDataSource(
CompilerOptions options, CompilerOptions options,
DiagnosticReporter reporter, DiagnosticReporter reporter,

View file

@ -37,7 +37,7 @@ class OrderedTypeSet {
OrderedTypeSet._(this._levels, this.types); OrderedTypeSet._(this._levels, this.types);
/// Deserializes a [OrderedTypeSet] object from [source]. /// Deserializes an [OrderedTypeSet] object from [source].
factory OrderedTypeSet.readFromDataSource(DataSourceReader source) { factory OrderedTypeSet.readFromDataSource(DataSourceReader source) {
// TODO(johnniwinther): Make the deserialized type sets share their // TODO(johnniwinther): Make the deserialized type sets share their
// internal links like the original type sets do? // internal links like the original type sets do?

View file

@ -98,20 +98,20 @@ abstract class Generator {
/// The source uri for use in error messaging. /// The source uri for use in error messaging.
Uri get _uri => _helper.uri; 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 /// The read of this subexpression does _not_ need to support a simultaneous
/// write of the same subexpression. /// write of the same subexpression.
Expression buildSimpleRead(); 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 LHS and [value] on the RHS.
/// ///
/// The returned expression evaluates to the assigned value, unless /// The returned expression evaluates to the assigned value, unless
/// [voidContext] is true, in which case it may evaluate to anything. /// [voidContext] is true, in which case it may evaluate to anything.
Expression buildAssignment(Expression value, {bool voidContext = false}); 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 generator on the LHS and [value] on the RHS.
/// ///
/// The returned expression evaluates to the assigned value, unless /// The returned expression evaluates to the assigned value, unless
@ -121,7 +121,7 @@ abstract class Generator {
Expression buildIfNullAssignment(Expression value, DartType type, int offset, Expression buildIfNullAssignment(Expression value, DartType type, int offset,
{bool voidContext = false}); {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. /// with the generator on the LHS and [value] on the RHS.
Expression buildCompoundAssignment(Name binaryOperator, Expression value, Expression buildCompoundAssignment(Name binaryOperator, Expression value,
{int offset = TreeNode.noOffset, {int offset = TreeNode.noOffset,
@ -129,7 +129,7 @@ abstract class Generator {
bool isPreIncDec = false, bool isPreIncDec = false,
bool isPostIncDec = 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. /// the generator.
Expression buildPrefixIncrement(Name binaryOperator, Expression buildPrefixIncrement(Name binaryOperator,
{int offset = TreeNode.noOffset, bool voidContext = false}) { {int offset = TreeNode.noOffset, bool voidContext = false}) {
@ -143,7 +143,7 @@ abstract class Generator {
isPreIncDec: true); 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. /// the generator.
Expression buildPostfixIncrement(Name binaryOperator, Expression buildPostfixIncrement(Name binaryOperator,
{int offset = TreeNode.noOffset, bool voidContext = false}); {int offset = TreeNode.noOffset, bool voidContext = false});
@ -154,7 +154,7 @@ abstract class Generator {
Generator buildIndexedAccess(Expression index, Token token, Generator buildIndexedAccess(Expression index, Token token,
{required bool isNullAware}); {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. /// At runtime, an exception will be thrown.
Expression _makeInvalidRead(UnresolvedKind unresolvedKind) { Expression _makeInvalidRead(UnresolvedKind unresolvedKind) {
@ -162,7 +162,7 @@ abstract class Generator {
kind: unresolvedKind); kind: unresolvedKind);
} }
/// Returns a [Expression] representing a compile-time error wrapping /// Returns an [Expression] representing a compile-time error wrapping
/// [value]. /// [value].
/// ///
/// At runtime, [value] will be evaluated before throwing an exception. /// 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. /// whose prefix is a forced extension instance member access.
/// ///
/// For instance /// 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. /// prefix is an explicit extension application.
/// ///
/// For instance /// For instance

View file

@ -290,8 +290,8 @@ abstract class _State extends Response {
final String _type; final String _type;
} }
/// A [HttpTimelineLoggingState] provides information about the current state of HTTP /// An [HttpTimelineLoggingState] provides information about the current state
/// request logging for a given isolate. /// of HTTP request logging for a given isolate.
class HttpTimelineLoggingState extends _State { class HttpTimelineLoggingState extends _State {
static HttpTimelineLoggingState? parse(Map<String, dynamic>? json) => static HttpTimelineLoggingState? parse(Map<String, dynamic>? json) =>
json == null ? null : HttpTimelineLoggingState._fromJson(json); json == null ? null : HttpTimelineLoggingState._fromJson(json);
@ -499,7 +499,8 @@ class HttpProfileRequestData {
/// Returns `true` if an error has occurred while issuing the request. /// 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; bool get hasError => error != null;
/// Information about the client connection. /// Information about the client connection.
@ -586,7 +587,7 @@ class HttpProfileRequestError implements Error {
String toString() => 'HttpProfileRequestError: $error.'; String toString() => 'HttpProfileRequestError: $error.';
} }
/// Proxy authentication details associated with a [HttpProfileRequest]. /// Proxy authentication details associated with an [HttpProfileRequest].
class HttpProfileProxyData { class HttpProfileProxyData {
static HttpProfileProxyData? parse(Map<String, dynamic>? json) => static HttpProfileProxyData? parse(Map<String, dynamic>? json) =>
json == null ? null : HttpProfileProxyData._fromJson(json); json == null ? null : HttpProfileProxyData._fromJson(json);
@ -738,7 +739,8 @@ class SocketProfilingState extends _State {
: super._fromJson(json); : super._fromJson(json);
} }
/// A [SpawnedProcessRef] contains identifying information about a spawned process. /// A [SpawnedProcessRef] contains identifying information about a spawned
/// process.
class SpawnedProcessRef { class SpawnedProcessRef {
static SpawnedProcessRef? parse(Map<String, dynamic>? json) => static SpawnedProcessRef? parse(Map<String, dynamic>? json) =>
json == null ? null : SpawnedProcessRef._fromJson(json); json == null ? null : SpawnedProcessRef._fromJson(json);
@ -836,7 +838,8 @@ class SpawnedProcessList extends Response {
final List<SpawnedProcessRef> _processes; 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 { class OpenFileRef {
static OpenFileRef? parse(Map<String, dynamic>? json) => static OpenFileRef? parse(Map<String, dynamic>? json) =>
json == null ? null : OpenFileRef._fromJson(json); json == null ? null : OpenFileRef._fromJson(json);

View file

@ -894,7 +894,7 @@ FlowGraph* StreamingFlowGraphBuilder::BuildGraph() {
const Function& function = parsed_function()->function(); 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. // e.g. for type translation.
const Class& klass = const Class& klass =
Class::Handle(zone_, parsed_function()->function().Owner()); Class::Handle(zone_, parsed_function()->function().Owner());

View file

@ -52,7 +52,7 @@ ScopeBuildingResult* ScopeBuilder::BuildScopes() {
const Function& function = parsed_function_->function(); 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. // e.g. for type translation.
const Class& klass = Class::Handle(Z, function.Owner()); const Class& klass = Class::Handle(Z, function.Owner());

View file

@ -14,7 +14,7 @@ extension Utf8InArena on String {
/// If 'string' contains NULL bytes, the converted string will be truncated /// If 'string' contains NULL bytes, the converted string will be truncated
/// prematurely. See [Utf8Encoder] for details on encoding. /// 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) { Pointer<Utf8> toUtf8(Allocator allocator) {
final units = utf8.encode(this); final units = utf8.encode(this);
final Pointer<Uint8> result = allocator<Uint8>(units.length + 1); final Pointer<Uint8> result = allocator<Uint8>(units.length + 1);

View file

@ -269,7 +269,7 @@ abstract class HttpServer implements Stream<HttpRequest> {
/// The default timeout is 20 minutes. /// The default timeout is 20 minutes.
set sessionTimeout(int timeout); set sessionTimeout(int timeout);
/// A [HttpConnectionsInfo] object summarizing the number of /// An [HttpConnectionsInfo] object summarizing the number of
/// current connections handled by the server. /// current connections handled by the server.
HttpConnectionsInfo connectionsInfo(); HttpConnectionsInfo connectionsInfo();
} }
@ -1070,7 +1070,7 @@ abstract class HttpResponse implements IOSink {
/// ## Making a simple GET request: an example /// ## Making a simple GET request: an example
/// ///
/// A `getUrl` request is a two-step process, triggered by two [Future]s. /// 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. /// network connection has been established, but no data has been sent.
/// In the callback function for the first future, the HTTP headers and body /// 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 /// 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). /// Cookies to present to the server (in the 'cookie' header).
List<Cookie> get cookies; 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. /// available.
/// ///
/// If an error occurs before the response is available, this future will /// 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. /// 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 /// server. Use [Stream] methods like [`transform`][Stream.transform] and
/// [`join`][Stream.join] to access the data. /// [`join`][Stream.join] to access the data.
/// ///

View file

@ -227,7 +227,7 @@ abstract class WebSocketTransformer
return _WebSocketTransformerImpl(protocolSelector, compression); 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 /// request is not a valid WebSocket upgrade request an HTTP response
/// with status code 500 will be returned. Otherwise the returned /// with status code 500 will be returned. Otherwise the returned
/// future will complete with the [WebSocket] when the upgrade process /// future will complete with the [WebSocket] when the upgrade process

View file

@ -18599,7 +18599,7 @@ class HttpRequest extends HttpRequestEventTarget {
* Length of time in milliseconds before a request is automatically * Length of time in milliseconds before a request is automatically
* terminated. * terminated.
* *
* When the time has passed, a [HttpRequestEventTarget.timeoutEvent] is * When the time has passed, an [HttpRequestEventTarget.timeoutEvent] is
* dispatched. * dispatched.
* *
* If [timeout] is set to 0, then the request will not time out. * If [timeout] is set to 0, then the request will not time out.

View file

@ -4384,7 +4384,7 @@
" * Length of time in milliseconds before a request is automatically", " * Length of time in milliseconds before a request is automatically",
" * terminated.", " * terminated.",
" *", " *",
" * When the time has passed, a [HttpRequestEventTarget.timeoutEvent] is", " * When the time has passed, an [HttpRequestEventTarget.timeoutEvent] is",
" * dispatched.", " * dispatched.",
" *", " *",
" * If [timeout] is set to 0, then the request will not time out.", " * If [timeout] is set to 0, then the request will not time out.",