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

Issue 1504553002: Better handling for binary operators in => bodies. (Closed)

Created:
5 years ago by Bob Nystrom
Modified:
5 years ago
Reviewers:
kevmoo
CC:
reviews_dartlang.org
Base URL:
https://github.com/dart-lang/dart_style.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Better handling for binary operators in => bodies. Treat them specially in two ways: - Don't increase the expression nesting. - Force the => to split if the body does. This has the nice effect of lining up all operands, even the first: function() => expression || expression || expression; Fix #434. R=kevmoo@google.com Committed: https://github.com/dart-lang/dart_style/commit/43d8304170821966f2ca8bc27cc4bb7f6c31e2bd

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -11 lines) Patch
M CHANGELOG.md View 1 chunk +1 line, -0 lines 0 comments Download
M lib/src/source_visitor.dart View 4 chunks +18 lines, -3 lines 0 comments Download
M test/regression/0000/0005.stmt View 1 chunk +2 lines, -1 line 0 comments Download
M test/regression/0000/0006.stmt View 1 chunk +2 lines, -1 line 0 comments Download
M test/regression/0000/0026.stmt View 1 chunk +1 line, -1 line 0 comments Download
M test/regression/0000/0076.unit View 1 chunk +2 lines, -1 line 0 comments Download
M test/regression/0100/0130.unit View 1 chunk +2 lines, -1 line 0 comments Download
A test/regression/0400/0434.unit View 1 chunk +20 lines, -0 lines 0 comments Download
M test/splitting/mixed.stmt View 2 chunks +16 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
Bob Nystrom
This has annoyed me forever. I'm pumped that the first turned out to be simple.
5 years ago (2015-12-05 01:18:16 UTC) #2
kevmoo
Holy cow LGTM! :-)
5 years ago (2015-12-05 01:27:59 UTC) #3
Bob Nystrom
5 years ago (2015-12-07 18:21:07 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
43d8304170821966f2ca8bc27cc4bb7f6c31e2bd (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698