ruby-changes:47853
From: sonots <ko1@a...>
Date: Wed, 20 Sep 2017 14:01:18 +0900 (JST)
Subject: [ruby-changes:47853] sonots:r59973 (trunk): ruby.c: show help messages of --dump
sonots 2017-09-20 14:01:09 +0900 (Wed, 20 Sep 2017) New Revision: 59973 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59973 Log: ruby.c: show help messages of --dump Modified files: trunk/ruby.c Index: ruby.c =================================================================== --- ruby.c (revision 59972) +++ ruby.c (revision 59973) @@ -240,13 +240,21 @@ usage(const char *name, int help) https://github.com/ruby/ruby/blob/trunk/ruby.c#L240 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) https://github.com/ruby/ruby/blob/trunk/ruby.c#L274 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]); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/