Index: lib/src/rule/rule.dart |
diff --git a/lib/src/rule/rule.dart b/lib/src/rule/rule.dart |
index 1fdadefdf26fd02e272012b6b824499e2b73fbee..43a7f6aae2c14119d5c198a80997627560d981cd 100644 |
--- a/lib/src/rule/rule.dart |
+++ b/lib/src/rule/rule.dart |
@@ -25,17 +25,9 @@ abstract class Rule extends FastHash { |
int get cost => Cost.normal; |
- /// The span of [Chunk]s that were written while this rule was still in |
- /// effect. |
- /// |
- /// This is used to tell which rules should be pre-emptively split if their |
- /// contents are too long. This may be a wider range than the set of chunks |
- /// enclosed by chunks whose rule is this one. A rule may still be on the |
- /// list of open rules for a while after its last chunk is written. |
- // TODO(rnystrom): These are only used by preemption which is kind of hacky. |
- // Remove this if preemption is redone. |
- int start; |
- int end; |
+ /// During line splitting [LineSplitter] sets this to the index of this |
+ /// rule in its list of rules. |
+ int index; |
/// The other [Rule]s that "surround" this one (and care about that fact). |
/// |
@@ -86,19 +78,6 @@ abstract class Rule extends FastHash { |
return null; |
} |
- /// Like [constrain], but in the other direction. |
- /// |
- /// If [other] has [otherValue], returns the constrained value this rule may |
- /// have, or `null` if any value is allowed. |
- int reverseConstrain(int otherValue, Rule other) { |
- // If [other] did not fully split, then we can't split either if us |
- // splitting implies that it should have. |
- if (otherValue == other.fullySplitValue) return null; |
- if (_outerRules.contains(other)) return 0; |
- |
- return null; |
- } |
- |
String toString() => "$id"; |
} |