aboutsummaryrefslogtreecommitdiffstats
path: root/node.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-24 15:59:31 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-24 15:59:31 +0000
commit7ea675732ac1dac72f07756498706678d8725719 (patch)
treee6a405332d045f861a5ec13e253bdcfc56ffbf5c /node.h
parentd2fa4d7118b4b064cd84a7b1dbf37ae0ff6c1883 (diff)
downloadruby-7ea675732ac1dac72f07756498706678d8725719.tar.gz
scoped constant op-assignment
* node.h (NODE_OP_CDECL), compile.c (iseq_compile_each), parse.y (stmt, arg): allow scoped constant op-assignment. [ruby-core:40154] [Bug #5449] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'node.h')
-rw-r--r--node.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/node.h b/node.h
index 09186094ba..0fa72545c2 100644
--- a/node.h
+++ b/node.h
@@ -88,6 +88,8 @@ enum node_type {
#define NODE_OP_ASGN_AND NODE_OP_ASGN_AND
NODE_OP_ASGN_OR,
#define NODE_OP_ASGN_OR NODE_OP_ASGN_OR
+ NODE_OP_CDECL,
+#define NODE_OP_CDECL NODE_OP_CDECL
NODE_CALL,
#define NODE_CALL NODE_CALL
NODE_FCALL,
@@ -399,6 +401,7 @@ typedef struct RNode {
#define NEW_OP_ASGN22(i,o) NEW_NODE(NODE_OP_ASGN2,i,o,rb_id_attrset(i))
#define NEW_OP_ASGN_OR(i,val) NEW_NODE(NODE_OP_ASGN_OR,i,val,0)
#define NEW_OP_ASGN_AND(i,val) NEW_NODE(NODE_OP_ASGN_AND,i,val,0)
+#define NEW_OP_CDECL(v,op,val) NEW_NODE(NODE_OP_CDECL,v,val,op)
#define NEW_GVAR(v) NEW_NODE(NODE_GVAR,v,0,rb_global_entry(v))
#define NEW_LVAR(v) NEW_NODE(NODE_LVAR,v,0,0)
#define NEW_DVAR(v) NEW_NODE(NODE_DVAR,v,0,0)