Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(637)

Unified Diff: lib/src/rule/combinator.dart

Issue 1492683002: Change the way hard splits are handled. (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/rule/argument.dart ('k') | lib/src/rule/metadata.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/rule/combinator.dart
diff --git a/lib/src/rule/combinator.dart b/lib/src/rule/combinator.dart
index 0bcd37e4a29a769a8c0dac5f651d8bf65119306f..1d73031006b7ceb05632317a8d8a1cde0966b724 100644
--- a/lib/src/rule/combinator.dart
+++ b/lib/src/rule/combinator.dart
@@ -80,12 +80,8 @@ class CombinatorRule extends Rule {
_names.last.add(chunk);
}
- bool isSplit(int value, Chunk chunk) {
+ bool isSplitAtValue(int value, Chunk chunk) {
switch (value) {
- case Rule.unsplit:
- // Don't split at all.
- return false;
-
case 1:
// Just split at the combinators.
return _combinators.contains(chunk);
@@ -106,11 +102,9 @@ class CombinatorRule extends Rule {
// Split everything.
return true;
- case 4:
+ default:
return true;
}
-
- throw "unreachable";
}
/// Returns `true` if [chunk] is for a combinator or a name in the
« no previous file with comments | « lib/src/rule/argument.dart ('k') | lib/src/rule/metadata.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698