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

Side by Side Diff: tools/gn/command_help.cc

Issue 1106003002: Add 'gn help grammar' contents to 'gn help all'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/gn/docs/reference.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <algorithm> 5 #include <algorithm>
6 #include <iostream> 6 #include <iostream>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "tools/gn/args.h" 9 #include "tools/gn/args.h"
10 #include "tools/gn/commands.h" 10 #include "tools/gn/commands.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 PrintLongHelp(f.second.help); 113 PrintLongHelp(f.second.help);
114 114
115 for (const auto& v: variables::GetBuiltinVariables()) 115 for (const auto& v: variables::GetBuiltinVariables())
116 PrintLongHelp(v.second.help); 116 PrintLongHelp(v.second.help);
117 117
118 for (const auto& v: variables::GetTargetVariables()) 118 for (const auto& v: variables::GetTargetVariables())
119 PrintLongHelp(v.second.help); 119 PrintLongHelp(v.second.help);
120 120
121 PrintLongHelp(kBuildArgs_Help); 121 PrintLongHelp(kBuildArgs_Help);
122 PrintLongHelp(kDotfile_Help); 122 PrintLongHelp(kDotfile_Help);
123 PrintLongHelp(kGrammar_Help);
123 PrintLongHelp(kInputConversion_Help); 124 PrintLongHelp(kInputConversion_Help);
124 PrintLongHelp(kLabelPattern_Help); 125 PrintLongHelp(kLabelPattern_Help);
125 PrintLongHelp(kSourceExpansion_Help); 126 PrintLongHelp(kSourceExpansion_Help);
126 PrintSwitchHelp(); 127 PrintSwitchHelp();
127 } 128 }
128 129
129 // Prints help on the given switch. There should be no leading hyphens. Returns 130 // Prints help on the given switch. There should be no leading hyphens. Returns
130 // true if the switch was found and help was printed. False means the switch is 131 // true if the switch was found and help was printed. False means the switch is
131 // unknown. 132 // unknown.
132 bool PrintHelpOnSwitch(const std::string& what) { 133 bool PrintHelpOnSwitch(const std::string& what) {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 return 0; 245 return 0;
245 } 246 }
246 247
247 // No help on this. 248 // No help on this.
248 Err(Location(), "No help on \"" + what + "\".").PrintToStdout(); 249 Err(Location(), "No help on \"" + what + "\".").PrintToStdout();
249 RunHelp(std::vector<std::string>()); 250 RunHelp(std::vector<std::string>());
250 return 1; 251 return 1;
251 } 252 }
252 253
253 } // namespace commands 254 } // namespace commands
OLDNEW
« no previous file with comments | « no previous file | tools/gn/docs/reference.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698