From 89e9df26819b9555fb790a16662f4ad2b9cbb2e2 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Mon, 8 Sep 2014 01:20:43 +0900 Subject: fixed wandering filename problem --- src/parse.y | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/parse.y') diff --git a/src/parse.y b/src/parse.y index e77085332..00d784d81 100644 --- a/src/parse.y +++ b/src/parse.y @@ -62,7 +62,12 @@ typedef unsigned int stack_type; #define CMDARG_P() BITSTACK_SET_P(p->cmdarg_stack) #define SET_LINENO(c,n) ((c)->lineno = (n)) -#define NODE_LINENO(c,n) do {if (n) ((c)->lineno = (n)->lineno);} while (0) +#define NODE_LINENO(c,n) do {\ + if (n) {\ + (c)->filename_index = (n)->filename_index;\ + (c)->lineno = (n)->lineno;\ + }\ +} while (0) #define sym(x) ((mrb_sym)(intptr_t)(x)) #define nsym(x) ((node*)(intptr_t)(x)) -- cgit v1.2.3