From 15352965c22e4eadef592a9c4efc8a8506fad4fe Mon Sep 17 00:00:00 2001 From: mame Date: Sun, 14 Jan 2018 13:51:44 +0000 Subject: parse.y: Remove almost all *_gen macros by passing parser_params explicitly In parse.y many functions were suffixed "_gen" and had companion macros to pass struct parser_params implicitly, which made parse.c bigger and more obscure. This change expands and removes almost all "*_gen" macros. This requires explicit passing of struct parser_params, i.e., we need to write "foo(p, ..)" instead of "foo(..)". However, it is just extra three letters. I believe that this is easier to understand. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'node.h') diff --git a/node.h b/node.h index ec1ae3d257..21ec7485cf 100644 --- a/node.h +++ b/node.h @@ -373,7 +373,7 @@ typedef struct RNode { #define NEW_DEFN(i,a,d,loc) NEW_NODE(NODE_DEFN,0,i,NEW_SCOPE(a,d,loc),loc) #define NEW_DEFS(r,i,a,d,loc) NEW_NODE(NODE_DEFS,r,i,NEW_SCOPE(a,d,loc),loc) -#define NEW_SCOPE(a,b,loc) NEW_NODE(NODE_SCOPE,local_tbl(),b,a,loc) +#define NEW_SCOPE(a,b,loc) NEW_NODE(NODE_SCOPE,local_tbl(p),b,a,loc) #define NEW_BLOCK(a,loc) NEW_NODE(NODE_BLOCK,a,0,0,loc) #define NEW_IF(c,t,e,loc) NEW_NODE(NODE_IF,c,t,e,loc) #define NEW_UNLESS(c,t,e,loc) NEW_NODE(NODE_UNLESS,c,t,e,loc) -- cgit v1.2.3