Skip to content

Commit 38336d6

Browse files
jensjohacommit-bot@chromium.org
authored andcommitted
[CFE] Split spell dictionary into several different dictionaries
Change-Id: Ie7e274b66d554eb9db8fffdf0e945d78be231ea8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112392 Commit-Queue: Jens Johansen <[email protected]> Reviewed-by: Johnni Winther <[email protected]>
1 parent b8f1b89 commit 38336d6

12 files changed

+1102
-960
lines changed

pkg/front_end/lib/src/fasta/builder/class_builder.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ abstract class ClassBuilder extends DeclarationBuilder {
363363
/// Find the first member of this class with [name]. This method isn't
364364
/// suitable for scope lookups as it will throw an error if the name isn't
365365
/// declared. The [scope] should be used for that. This method is used to
366-
/// find a member that is known to exist and it wil pick the first
366+
/// find a member that is known to exist and it will pick the first
367367
/// declaration if the name is ambiguous.
368368
///
369369
/// For example, this method is convenient for use when building synthetic

pkg/front_end/lib/src/fasta/kernel/body_builder.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ class BodyBuilder extends ScopeListener<JumpTarget>
834834
// [legacyMode] is enabled.
835835
// 2) the member [typeEnvironment] might be null when [legacyMode] is
836836
// enabled.
837-
// This particular behaviour can be observed when running the fasta perf
837+
// This particular behavior can be observed when running the fasta perf
838838
// benchmarks.
839839
if (!legacyMode && builder.returnType != null) {
840840
DartType returnType = builder.function.returnType;

pkg/front_end/test/fasta/messages_test.dart

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,23 @@ class MessageTestSuite extends ChainContext {
106106
var value = node.value;
107107
switch (key) {
108108
case "template":
109-
Set<String> misspelled = spell.spellcheckString(value);
109+
Set<String> misspelled = spell.spellcheckString(value,
110+
dictionaries: const [
111+
spell.Dictionaries.common,
112+
spell.Dictionaries.cfeMessages
113+
]);
110114
if (misspelled != null) {
111115
misspelledTemplate = node;
112116
misspelledTemplateWords = misspelled;
113117
}
114118
break;
115119

116120
case "tip":
117-
Set<String> misspelled = spell.spellcheckString(value);
121+
Set<String> misspelled = spell.spellcheckString(value,
122+
dictionaries: const [
123+
spell.Dictionaries.common,
124+
spell.Dictionaries.cfeMessages
125+
]);
118126
if (misspelled != null) {
119127
misspelledTip = node;
120128
misspelledTipWords = misspelled;

0 commit comments

Comments
 (0)