OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |