Skip to content

Commit c18503c

Browse files
committed
ruby.c: show help messages of --dump
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 71345cf commit c18503c

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

ruby.c

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,21 @@ usage(const char *name, int help)
240240
M("-h", "", "show this message, --help for more info"),
241241
};
242242
static const struct message help_msg[] = {
243-
M("--copyright", "", "print the copyright"),
244-
M("--enable=feature[,...]", ", --disable=feature[,...]",
245-
"enable or disable features"),
246-
M("--external-encoding=encoding", ", --internal-encoding=encoding",
243+
M("--copyright", "", "print the copyright"),
244+
M("--dump={insns|parsetree|...}[,...]", "",
245+
"dump debug information. see below for available dump list"),
246+
M("--enable={gems|rubyopt|...}[,...]", ", --disable={gems|rubyopt|...}[,...]",
247+
"enable or disable features. see below for available features"),
248+
M("--external-encoding=encoding", ", --internal-encoding=encoding",
247249
"specify the default external or internal character encoding"),
248-
M("--version", "", "print the version"),
249-
M("--help", "", "show this message, -h for short message"),
250+
M("--version", "", "print the version"),
251+
M("--help", "", "show this message, -h for short message"),
252+
};
253+
static const struct message dumps[] = {
254+
M("insns", "", "instruction sequences"),
255+
M("yydebug", "", "yydebug of yacc parser generator"),
256+
M("parsetree", "", "AST"),
257+
M("parsetree_with_comment", "", "AST with comments"),
250258
};
251259
static const struct message features[] = {
252260
M("gems", "", "rubygems (default: "DEFAULT_RUBYGEMS_ENABLED")"),
@@ -266,6 +274,9 @@ usage(const char *name, int help)
266274

267275
for (i = 0; i < numberof(help_msg); ++i)
268276
SHOW(help_msg[i]);
277+
puts("Dump List:");
278+
for (i = 0; i < numberof(dumps); ++i)
279+
SHOW(dumps[i]);
269280
puts("Features:");
270281
for (i = 0; i < numberof(features); ++i)
271282
SHOW(features[i]);

0 commit comments

Comments
 (0)