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

Issue 607173002: gn format: fix comments at end of blocks (Closed)

Created:
6 years, 2 months ago by scottmg
Modified:
6 years, 2 months ago
Reviewers:
brettw
CC:
chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

gn format: fix comments at end of blocks Fixes comments at the end of a block like: stuff() { sources = [] # wee } This is done by storing an EndNode (instead of just a Token) as the end of Block and List nodes. This means there's a node in the tree traversal for the trailing ], and gives a place to attach the comment. Also collapses some of the expression output code to reuse Sequence. R=brettw@chromium.org BUG=348474 Committed: https://crrev.com/f7e13e52cddeda696e71c0ab4c08876ddeef4330 Cr-Commit-Position: refs/heads/master@{#297226}

Patch Set 1 #

Patch Set 2 : fix rebase #

Patch Set 3 : another test #

Patch Set 4 : clang warning #

Total comments: 4

Patch Set 5 : review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+219 lines, -53 lines) Patch
M tools/gn/command_format.cc View 9 chunks +51 lines, -34 lines 0 comments Download
M tools/gn/command_format_unittest.cc View 2 chunks +4 lines, -1 line 0 comments Download
A + tools/gn/format_test_data/015.golden View 1 chunk +2 lines, -1 line 0 comments Download
A tools/gn/format_test_data/017.gn View 1 2 1 chunk +15 lines, -0 lines 0 comments Download
A tools/gn/format_test_data/017.golden View 1 2 1 chunk +19 lines, -0 lines 0 comments Download
M tools/gn/parse_tree.h View 1 2 3 4 7 chunks +42 lines, -8 lines 0 comments Download
M tools/gn/parse_tree.cc View 1 2 3 4 6 chunks +41 lines, -4 lines 0 comments Download
M tools/gn/parser.cc View 1 2 3 7 chunks +10 lines, -5 lines 0 comments Download
M tools/gn/parser_unittest.cc View 1 2 1 chunk +35 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
scottmg
6 years, 2 months ago (2014-09-26 19:52:26 UTC) #2
brettw
https://codereview.chromium.org/607173002/diff/60001/tools/gn/parse_tree.h File tools/gn/parse_tree.h (right): https://codereview.chromium.org/607173002/diff/60001/tools/gn/parse_tree.h#newcode28 tools/gn/parse_tree.h:28: class EndNode; Can you sort this list? https://codereview.chromium.org/607173002/diff/60001/tools/gn/parse_tree.h#newcode480 tools/gn/parse_tree.h:480: ...
6 years, 2 months ago (2014-09-26 21:37:34 UTC) #3
scottmg
Thanks https://codereview.chromium.org/607173002/diff/60001/tools/gn/parse_tree.h File tools/gn/parse_tree.h (right): https://codereview.chromium.org/607173002/diff/60001/tools/gn/parse_tree.h#newcode28 tools/gn/parse_tree.h:28: class EndNode; On 2014/09/26 21:37:34, brettw wrote: > ...
6 years, 2 months ago (2014-09-26 21:47:33 UTC) #4
brettw
lgtm
6 years, 2 months ago (2014-09-29 17:09:14 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/607173002/80001
6 years, 2 months ago (2014-09-29 18:20:08 UTC) #7
commit-bot: I haz the power
Committed patchset #5 (id:80001) as 5a45b8be01f2b47842323466d34f5e34418eb895
6 years, 2 months ago (2014-09-29 19:21:21 UTC) #8
commit-bot: I haz the power
6 years, 2 months ago (2014-09-29 19:22:16 UTC) #9
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/f7e13e52cddeda696e71c0ab4c08876ddeef4330
Cr-Commit-Position: refs/heads/master@{#297226}

Powered by Google App Engine
This is Rietveld 408576698