summaryrefslogtreecommitdiff
path: root/lang/ruby18-base/patches/patch-cc
blob: 4efbea0196404a9527921776d0acb411a90ccb2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
$NetBSD: patch-cc,v 1.3 2006/07/30 23:12:50 taca Exp $

--- parse.y.orig	2005-12-19 23:33:05.000000000 +0900
+++ parse.y
@@ -277,9 +277,9 @@ static void top_local_setup();
 %type <node> mrhs superclass block_call block_command
 %type <node> f_arglist f_args f_optarg f_opt f_block_arg opt_f_block_arg
 %type <node> assoc_list assocs assoc undef_list backref string_dvar
-%type <node> block_var opt_block_var brace_block cmd_brace_block do_block lhs none
+%type <node> block_var opt_block_var brace_block cmd_brace_block do_block lhs none fitem
 %type <node> mlhs mlhs_head mlhs_basic mlhs_entry mlhs_item mlhs_node
-%type <id>   fitem variable sym symbol operation operation2 operation3
+%type <id>   fsym variable sym symbol operation operation2 operation3
 %type <id>   cname fname op f_rest_arg
 %type <num>  f_norm_arg f_arg
 %token tUPLUS 		/* unary+ */
@@ -916,10 +916,17 @@ fname		: tIDENTIFIER
 		    }
 		;
 
-fitem		: fname
+fsym		: fname
 		| symbol
 		;
 
+fitem		: fsym
+		    {
+			$$ = NEW_LIT(ID2SYM($1));
+		    }
+		| dsym
+		;
+
 undef_list	: fitem
 		    {
 			$$ = NEW_UNDEF($1);