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

Unified Diff: tools/gn/command_help.cc

Issue 1015063003: tools/gn: add "gn help grammar" with formal grammar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove line requested by brettw Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/gn/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/command_help.cc
diff --git a/tools/gn/command_help.cc b/tools/gn/command_help.cc
index 0f8c34790a7d593dff32f67014c13b532fbdc3a9..d4f5ca5a32f556a04769e6d50b9d65fc065f82d7 100644
--- a/tools/gn/command_help.cc
+++ b/tools/gn/command_help.cc
@@ -12,6 +12,7 @@
#include "tools/gn/functions.h"
#include "tools/gn/input_conversion.h"
#include "tools/gn/label_pattern.h"
+#include "tools/gn/parser.h"
#include "tools/gn/setup.h"
#include "tools/gn/standard_out.h"
#include "tools/gn/substitution_writer.h"
@@ -58,6 +59,7 @@ void PrintToplevelHelp() {
OutputString("\nOther help topics:\n");
PrintShortHelp("buildargs: How build arguments work.");
PrintShortHelp("dotfile: Info about the toplevel .gn file.");
+ PrintShortHelp("grammar: Formal grammar for GN build files.");
PrintShortHelp("label_pattern: Matching more than one label.");
PrintShortHelp(
"input_conversion: Processing input from exec_script and read_file.");
@@ -169,6 +171,10 @@ int RunHelp(const std::vector<std::string>& args) {
PrintLongHelp(kDotfile_Help);
return 0;
}
+ if (what == "grammar") {
+ PrintLongHelp(kGrammar_Help);
+ return 0;
+ }
if (what == "input_conversion") {
PrintLongHelp(kInputConversion_Help);
return 0;
« no previous file with comments | « no previous file | tools/gn/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698