diff options
author | Gerard Goossen <gerard@tty.nl> | 2007-05-08 19:42:45 +0200 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2007-05-12 22:44:02 +0000 |
commit | dde833314f5826ee54c52d1baaca343300ee23fd (patch) | |
tree | a85f5264106fb87b58cfad478baeb9cd2301e474 | |
parent | fb2b694ac153e3b2b3f9e40df708ecd1973cbf38 (diff) | |
download | perl-dde833314f5826ee54c52d1baaca343300ee23fd.tar.gz |
Give the 'local' declarator a new key, such that 'local our'
declaration don't have multiple 'd' keys.
Subject: [PATCH] mad: different key for the locale declarator
Message-Id: <20070508171125.GI17043@ostwald>
p4raw-id: //depot/perl@31208
-rwxr-xr-x | mad/Nomad.pm | 1 | ||||
-rw-r--r-- | op.h | 1 | ||||
-rw-r--r-- | perly.act | 2 | ||||
-rw-r--r-- | perly.y | 2 |
4 files changed, 4 insertions, 2 deletions
diff --git a/mad/Nomad.pm b/mad/Nomad.pm index e425467038..4fdd3a89ee 100755 --- a/mad/Nomad.pm +++ b/mad/Nomad.pm @@ -440,6 +440,7 @@ sub newtype { sub madness { my $self = shift; my @keys = split(' ', shift); + @keys = map { $_ eq 'd' ? ('k', 'd') : $_ } @keys; my @vals = (); for my $key (@keys) { my $madprop = $self->{mp}{$key}; @@ -696,6 +696,7 @@ struct token { * g op was forced to be a word * i if/unless modifier * I if/elsif/unless statement + * k local declarator * K retired kid op * l last index of array ($#foo) * L label @@ -1213,7 +1213,7 @@ case 2: case 154: #line 1085 "perly.y" { (yyval.opval) = localize((ps[(2) - (2)].val.opval),IVAL((ps[(1) - (2)].val.i_tkval))); - TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'d'); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'k'); ;} break; @@ -1083,7 +1083,7 @@ term : termbinop { $$ = $1; } | LOCAL term %prec UNIOP { $$ = localize($2,IVAL($1)); - TOKEN_GETMAD($1,$$,'d'); + TOKEN_GETMAD($1,$$,'k'); } | '(' expr ')' { $$ = sawparens(IF_MAD(newUNOP(OP_NULL,0,$2), $2)); |