|
Change the way hard splits are handled.
By having a separate rule for hard splits, we lose any constraints the
original soft rule may have had or -- more importantly -- other rules
may have had on it.
For constraints where hardening the rule forces other rules to fully
harden, it's fine because we propagate those constraints when the rule
is hardened. The problem comes with "cannot split" constraints. If rule
A has a "cannot split" constraint on rule B when rule A has some value,
we need to remember that even if B is hardened so that we prevent A
from taking that value.
Instead of swapping out the rule with a separate hard split rule, the
idea is to keep the rule (and thus preserve references to it) but change
it to a "hardened" state.
R=kevmoo@google.com
Committed: https://github.com/dart-lang/dart_style/commit/d960898412cccb989c0f1fab416357994a22e15a
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+147 lines, -130 lines) |
Patch |
|
M |
lib/src/argument_list_visitor.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lib/src/chunk.dart
|
View
|
|
4 chunks |
+2 lines, -16 lines |
0 comments
|
Download
|
|
M |
lib/src/chunk_builder.dart
|
View
|
|
9 chunks |
+24 lines, -20 lines |
0 comments
|
Download
|
|
M |
lib/src/debug.dart
|
View
|
|
3 chunks |
+34 lines, -10 lines |
0 comments
|
Download
|
|
M |
lib/src/line_splitting/line_splitter.dart
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lib/src/line_splitting/rule_set.dart
|
View
|
|
2 chunks |
+19 lines, -2 lines |
0 comments
|
Download
|
|
M |
lib/src/line_splitting/solve_state.dart
|
View
|
|
3 chunks |
+2 lines, -7 lines |
0 comments
|
Download
|
|
M |
lib/src/line_writer.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lib/src/rule/argument.dart
|
View
|
|
3 chunks |
+6 lines, -16 lines |
0 comments
|
Download
|
|
M |
lib/src/rule/combinator.dart
|
View
|
|
2 chunks |
+2 lines, -8 lines |
0 comments
|
Download
|
|
M |
lib/src/rule/metadata.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lib/src/rule/rule.dart
|
View
|
|
4 chunks |
+42 lines, -37 lines |
0 comments
|
Download
|
|
M |
lib/src/source_visitor.dart
|
View
|
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
test/regression/0200/0221.unit
|
View
|
|
1 chunk |
+7 lines, -5 lines |
0 comments
|
Download
|
Total messages: 6 (2 generated)
|