- Timestamp:
- 08/07/08 22:23:40 (4 months ago)
- Files:
-
- 1 modified
-
src/perl6/STD.pm (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/perl6/STD.pm
r21834 r21836 7 7 my $GOAL is context = "(eof)"; 8 8 my $PARSER is context<rw>; 9 my $IN_DECL is context<rw>; 9 10 10 11 # random rule for debugging, please ignore … … 1062 1063 1063 1064 token variable_declarator { 1065 :my $IN_DECL is context<rw> = 1; 1064 1066 <variable> { $<sigil> = $<variable><sigil> } 1067 { $IN_DECL = 0; } 1065 1068 [ # Is it a shaped array or hash declaration? 1066 1069 # <?{ $<sigil> eq '@' | '%' }> … … 1516 1519 <name> 1517 1520 # XXX too soon 1518 [ <colonpair>+ { $¢.add_macro($<name>) ; } ]?1521 [ <colonpair>+ { $¢.add_macro($<name>) if $+IN_DECL; } ]? 1519 1522 } 1520 1523 … … 1543 1546 [ 1544 1547 | <category> 1545 [ <colonpair>+ { $¢.add_macro($<category>) ; } ]?1548 [ <colonpair>+ { $¢.add_macro($<category>) if $+IN_DECL; } ]? 1546 1549 | <desigilname> 1547 1550 ] … … 2347 2350 2348 2351 rule routine_def { 2352 :my $IN_DECL is context<rw> = 1; 2349 2353 [ '&'<deflongname>? | <deflongname> ]? [ <multisig> | <trait> ]* 2350 2354 <!!{ bless $¢, ref $PARSER; }> 2355 { $IN_DECL = 0; } 2351 2356 <block> 2352 2357 } … … 2421 2426 2422 2427 token signature { 2428 # XXX incorrectly scopes &infix:<x> parameters to outside following block 2429 :my $IN_DECL is context<rw> = 1; 2423 2430 :my $zone is context<rw> = 'posreq'; 2424 2431 <.ws> … … 2429 2436 <.ws> 2430 2437 [ '-->' <.ws> <fulltypename> ]? 2438 { $IN_DECL = 0; } 2431 2439 } 2432 2440
