|
Handle complex expression nesting correctly.
Previously, the formatter would get confused if it didn't indent enough
for several levels of expression nesting which later turned out to be
needed by later lines.
This addresses that. It does negatively impact perf (about 3x) but I
hope I can regain some of that in later optimizations.
Fixes #49, #66, #75, #83, and #84.
R=pquitslund@google.com
Committed: 50b9d91b6c7aa57196d4a434533b2e6e3cea0de6
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+598 lines, -196 lines) |
Patch |
|
M |
benchmark/benchmark.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lib/src/chunk.dart
|
View
|
|
3 chunks |
+7 lines, -5 lines |
0 comments
|
Download
|
|
M |
lib/src/debug.dart
|
View
|
|
3 chunks |
+9 lines, -11 lines |
0 comments
|
Download
|
|
M |
lib/src/line_splitter.dart
|
View
|
|
11 chunks |
+283 lines, -96 lines |
0 comments
|
Download
|
|
M |
lib/src/line_writer.dart
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
lib/src/nesting.dart
|
View
|
|
2 chunks |
+112 lines, -66 lines |
0 comments
|
Download
|
|
M |
lib/src/source_visitor.dart
|
View
|
|
2 chunks |
+10 lines, -12 lines |
0 comments
|
Download
|
|
M |
test/comments/expressions.stmt
|
View
|
|
1 chunk |
+8 lines, -1 line |
0 comments
|
Download
|
|
A |
test/regression/49.stmt
|
View
|
|
1 chunk |
+12 lines, -0 lines |
0 comments
|
Download
|
|
A |
test/regression/66.stmt
|
View
|
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
|
A |
test/regression/75.unit
|
View
|
|
1 chunk |
+26 lines, -0 lines |
0 comments
|
Download
|
|
A |
test/regression/83.unit
|
View
|
|
1 chunk |
+20 lines, -0 lines |
0 comments
|
Download
|
|
A |
test/regression/84.unit
|
View
|
|
1 chunk |
+92 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/splitting/expressions.stmt
|
View
|
|
1 chunk |
+7 lines, -1 line |
0 comments
|
Download
|
|
M |
test/splitting/mixed.stmt
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
Total messages: 5 (1 generated)
|