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

Issue 802513004: Handle complex expression nesting correctly. (Closed)

Created:
6 years ago by Bob Nystrom
Modified:
6 years ago
Reviewers:
pquitslund
CC:
reviews_dartlang.org
Base URL:
https://github.com/dart-lang/dart_style.git@master
Visibility:
Public.

Description

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

Patch Set 1 #

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

Messages

Total messages: 5 (1 generated)
Bob Nystrom
Sorry for the very large patch. It took a bunch of changes to get it ...
6 years ago (2014-12-15 20:35:11 UTC) #2
pquitslund
LGTM. Not surprised about the perf hit. It'll be interesting to see if you can ...
6 years ago (2014-12-15 21:40:24 UTC) #3
Bob Nystrom
On 2014/12/15 21:40:24, pquitslund wrote: > LGTM. > > Not surprised about the perf hit. ...
6 years ago (2014-12-15 23:21:32 UTC) #4
Bob Nystrom
6 years ago (2014-12-15 23:23:00 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
50b9d91b6c7aa57196d4a434533b2e6e3cea0de6 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698