[ruby/prism] Rename suppress warnings to verbose

https://github.com/ruby/prism/commit/fbb30216ca
This commit is contained in:
Kevin Newton 2023-11-03 10:52:27 -04:00 committed by git
parent 4b5f516f2e
commit 47163f9cf9
2 changed files with 7 additions and 7 deletions

View File

@ -299,7 +299,7 @@ module Prism
values << (options.fetch(:frozen_string_literal, false) ? 1 : 0)
template << "C"
values << (options.fetch(:suppress_warnings, false) ? 1 : 0)
values << (options[:verbose] ? 0 : 1)
template << "L"
if (scopes = options[:scopes])

View File

@ -22,7 +22,7 @@ ID rb_option_id_filepath;
ID rb_option_id_encoding;
ID rb_option_id_line;
ID rb_option_id_frozen_string_literal;
ID rb_option_id_suppress_warnings;
ID rb_option_id_verbose;
ID rb_option_id_scopes;
/******************************************************************************/
@ -130,8 +130,8 @@ build_options_i(VALUE key, VALUE value, VALUE argument) {
if (!NIL_P(value)) pm_options_line_set(options, NUM2UINT(value));
} else if (key_id == rb_option_id_frozen_string_literal) {
if (!NIL_P(value)) pm_options_frozen_string_literal_set(options, value == Qtrue);
} else if (key_id == rb_option_id_suppress_warnings) {
if (!NIL_P(value)) pm_options_suppress_warnings_set(options, value == Qtrue);
} else if (key_id == rb_option_id_verbose) {
pm_options_suppress_warnings_set(options, value != Qtrue);
} else if (key_id == rb_option_id_scopes) {
if (!NIL_P(value)) build_options_scopes(options, value);
} else {
@ -626,8 +626,8 @@ parse_input(pm_string_t *input, const pm_options_t *options) {
* integer or nil. Note that this is 1-indexed.
* * `frozen_string_literal` - whether or not the frozen string literal pragma
* has been set. This should be a boolean or nil.
* * `suppress_warnings` - whether or not warnings should be suppressed. This
* should be a boolean or nil.
* * `verbose` - the current level of verbosity. This controls whether or not
* the parser emits warnings. This should be a boolean or nil.
* * `scopes` - the locals that are in scope surrounding the code that is being
* parsed. This should be an array of arrays of symbols or nil.
*/
@ -947,7 +947,7 @@ Init_prism(void) {
rb_option_id_encoding = rb_intern_const("encoding");
rb_option_id_line = rb_intern_const("line");
rb_option_id_frozen_string_literal = rb_intern_const("frozen_string_literal");
rb_option_id_suppress_warnings = rb_intern_const("suppress_warnings");
rb_option_id_verbose = rb_intern_const("verbose");
rb_option_id_scopes = rb_intern_const("scopes");
/**