aboutsummaryrefslogtreecommitdiffstats
path: root/node.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-27 06:44:02 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-27 06:44:02 +0000
commit0c68198cc49431c683ffb9915e67cd05f625553a (patch)
tree2f87021f6f7a577c1ab65ed51191bd448e39570e /node.c
parent868a0970b6503c402d1190ecc00c7cd4c9521ece (diff)
downloadruby-0c68198cc49431c683ffb9915e67cd05f625553a.tar.gz
fronzen-string-literal pragma
* compile.c (iseq_compile_each): override compile option by option given by pragma. * iseq.c (rb_iseq_make_compile_option): extract a function to overwrite rb_compile_option_t. * parse.y (parser_set_compile_option_flag): introduce pragma to override compile options. * parse.y (magic_comments): new pragma "fronzen-string-literal". [Feature #8976] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'node.c')
-rw-r--r--node.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/node.c b/node.c
index 79f65ec684..1153431206 100644
--- a/node.c
+++ b/node.c
@@ -804,8 +804,10 @@ dump_node(VALUE buf, VALUE indent, int comment, NODE *node)
ANN("format: BEGIN { [nd_head] }; [nd_body]");
ANN("example: bar; BEGIN { foo }");
F_NODE(nd_head, "prelude");
- LAST_NODE;
F_NODE(nd_body, "body");
+ LAST_NODE;
+#define nd_compile_option u3.value
+ F_LIT(nd_compile_option, "compile_option");
break;
case NODE_LAMBDA: