summaryrefslogtreecommitdiff
path: root/universal_parser.c
diff options
context:
space:
mode:
authoryui-knk <spiketeika@gmail.com>2024-03-24 08:39:27 +0900
committerYuichiro Kaneko <spiketeika@gmail.com>2024-04-02 08:26:58 +0900
commit799e854897856e431c03a5122252358e2c57aff2 (patch)
tree4918d58d1bdcdb229c2419d381743007b62e1d2d /universal_parser.c
parent8066e3ea6e9462f510e5d0da887be94b18cce50b (diff)
[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.
Diffstat (limited to 'universal_parser.c')
-rw-r--r--universal_parser.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/universal_parser.c b/universal_parser.c
index 4a02675eec..dfb02eaa4c 100644
--- a/universal_parser.c
+++ b/universal_parser.c
@@ -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