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

Unified Diff: tools/gn/parse_tree.h

Issue 1442023002: Sort "deps" and "public_deps" when running the "gn format" command. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments following suggestions Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/format_test_data/065.golden ('k') | tools/gn/parse_tree.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/parse_tree.h
diff --git a/tools/gn/parse_tree.h b/tools/gn/parse_tree.h
index b134d4a9065606f3e979b112f92279933b2efa07..36c511a62ab00d60a5ca3b5e74fe68a56e717ad4 100644
--- a/tools/gn/parse_tree.h
+++ b/tools/gn/parse_tree.h
@@ -372,6 +372,7 @@ class ListNode : public ParseNode {
const std::vector<const ParseNode*>& contents() const { return contents_; }
void SortAsStringsList();
+ void SortAsDepsList();
// During formatting, do we want this list to always be multliline? This is
// used to make assignments to deps, sources, etc. always be multiline lists,
@@ -390,6 +391,9 @@ class ListNode : public ParseNode {
std::vector<SortRange> GetSortRanges() const;
private:
+ template <typename Comparator>
+ void SortList(Comparator comparator);
+
// Tokens corresponding to the [ and ]. The end token is stored in inside an
// custom parse node so that it can have comments hung off of it.
Token begin_token_;
« no previous file with comments | « tools/gn/format_test_data/065.golden ('k') | tools/gn/parse_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698