aboutsummaryrefslogtreecommitdiffstats
path: root/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'node.c')
-rw-r--r--node.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/node.c b/node.c
index 039d110ff0..fa3189d128 100644
--- a/node.c
+++ b/node.c
@@ -865,11 +865,14 @@ dump_node(VALUE buf, VALUE indent, int comment, NODE *node)
ANN("pre-execution");
ANN("format: BEGIN { [nd_head] }; [nd_body]");
ANN("example: bar; BEGIN { foo }");
+#define nd_compile_option u3.value
F_NODE(nd_head, "prelude");
+ if (!node->nd_compile_option) LAST_NODE;
F_NODE(nd_body, "body");
- LAST_NODE;
-#define nd_compile_option u3.value
- F_OPTION(nd_compile_option, "compile_option");
+ if (node->nd_compile_option) {
+ LAST_NODE;
+ F_OPTION(nd_compile_option, "compile_option");
+ }
break;
case NODE_LAMBDA: