aboutsummaryrefslogtreecommitdiffstats
path: root/ruby.c
diff options
context:
space:
mode:
authorsonots <sonots@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-20 05:01:09 +0000
committersonots <sonots@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-20 05:01:09 +0000
commite93f0738e3d5cc35b8a6d3c38aeba20b47592fbf (patch)
tree1f5c3f732091a79e7d69b071d90d84a6b0b5911b /ruby.c
parent4b028cd0b43f3ea8fd6742fbac4a8f494430334b (diff)
downloadruby-e93f0738e3d5cc35b8a6d3c38aeba20b47592fbf.tar.gz
ruby.c: show help messages of --dump
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/ruby.c b/ruby.c
index 3a7b35f010..c26a5dd8de 100644
--- a/ruby.c
+++ b/ruby.c
@@ -240,13 +240,21 @@ usage(const char *name, int help)
M("-h", "", "show this message, --help for more info"),
};
static const struct message help_msg[] = {
- M("--copyright", "", "print the copyright"),
- M("--enable=feature[,...]", ", --disable=feature[,...]",
- "enable or disable features"),
- M("--external-encoding=encoding", ", --internal-encoding=encoding",
+ M("--copyright", "", "print the copyright"),
+ M("--dump={insns|parsetree|...}[,...]", "",
+ "dump debug information. see below for available dump list"),
+ M("--enable={gems|rubyopt|...}[,...]", ", --disable={gems|rubyopt|...}[,...]",
+ "enable or disable features. see below for available features"),
+ M("--external-encoding=encoding", ", --internal-encoding=encoding",
"specify the default external or internal character encoding"),
- M("--version", "", "print the version"),
- M("--help", "", "show this message, -h for short message"),
+ M("--version", "", "print the version"),
+ M("--help", "", "show this message, -h for short message"),
+ };
+ static const struct message dumps[] = {
+ M("insns", "", "instruction sequences"),
+ M("yydebug", "", "yydebug of yacc parser generator"),
+ M("parsetree", "", "AST"),
+ M("parsetree_with_comment", "", "AST with comments"),
};
static const struct message features[] = {
M("gems", "", "rubygems (default: "DEFAULT_RUBYGEMS_ENABLED")"),
@@ -266,6 +274,9 @@ usage(const char *name, int help)
for (i = 0; i < numberof(help_msg); ++i)
SHOW(help_msg[i]);
+ puts("Dump List:");
+ for (i = 0; i < numberof(dumps); ++i)
+ SHOW(dumps[i]);
puts("Features:");
for (i = 0; i < numberof(features); ++i)
SHOW(features[i]);