summaryrefslogtreecommitdiffhomepage
path: root/src/parse.y
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-06-28 23:35:17 +0900
committerYukihiro Matsumoto <[email protected]>2012-06-28 23:35:17 +0900
commit4a98d5c8fd56119a5e30f8e371fd4aac1866895d (patch)
tree39d58a1546965ad3f4e818e38b0aaf2375358dd5 /src/parse.y
parent4fd932548ef4aa92a089a6a7dc412cd09eb2284e (diff)
downloadmruby-4a98d5c8fd56119a5e30f8e371fd4aac1866895d.tar.gz
mruby-4a98d5c8fd56119a5e30f8e371fd4aac1866895d.zip
allow string interpolation in symbols like :"a=#{15}"
Diffstat (limited to 'src/parse.y')
-rw-r--r--src/parse.y14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/parse.y b/src/parse.y
index 069a97412..af8b93cfa 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -527,13 +527,6 @@ new_strsym(parser_state *p, node* str)
return mrb_intern2(p->mrb, s, len);
}
-// (:sym . a)
-static node*
-new_dsym(parser_state *p, node *a)
-{
- return cons((node*)NODE_DSYM, a);
-}
-
// (:lvar . a)
static node*
new_lvar(parser_state *p, mrb_sym sym)
@@ -705,6 +698,13 @@ new_dstr(parser_state *p, node *a)
return cons((node*)NODE_DSTR, a);
}
+// (:dsym . a)
+static node*
+new_dsym(parser_state *p, node *a)
+{
+ return cons((node*)NODE_DSYM, new_dstr(p, a));
+}
+
// (:backref . n)
static node*
new_back_ref(parser_state *p, int n)