[Feature #20331] Simplify parser warnings for hash keys duplication and when clause duplication

This commit simplifies warnings for hash keys duplication and when clause duplication,
based on the discussion of https://bugs.ruby-lang.org/issues/20331.
Warnings are reported only when strings are same to ohters.
This commit is contained in:
yui-knk 2024-03-24 08:39:27 +09:00 committed by Yuichiro Kaneko
parent 8066e3ea6e
commit 799e854897
8 changed files with 96 additions and 151 deletions

View file

@ -54,6 +54,10 @@
#define st_delete rb_parser_st_delete
#undef st_is_member
#define st_is_member parser_st_is_member
#undef st_init_table
#define st_init_table rb_parser_st_init_table
#undef st_lookup
#define st_lookup rb_parser_st_lookup
#define rb_encoding void
@ -227,9 +231,6 @@ struct rb_imemo_tmpbuf_struct {
#define rb_local_defined p->config->local_defined
#define rb_dvar_defined p->config->dvar_defined
#define literal_cmp p->config->literal_cmp
#define literal_hash p->config->literal_hash
#define rb_syntax_error_append p->config->syntax_error_append
#define rb_raise p->config->raise
#define syntax_error_new p->config->syntax_error_new