Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[dotnet] Support ::Foo := ... style declarations for putting bareword…
… names into the lexpad.
  • Loading branch information
jnthn committed Oct 20, 2010
1 parent 4772c46 commit 8948ea1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion dotnet/compiler/Actions.pm
Expand Up @@ -327,7 +327,12 @@ method variable($/) {
$past.viviself( vivitype( $<sigil> ) );
$past.lvalue(1);
}
if $<twigil>[0] eq '*' {
if $<sigil> eq '::' {
$past.isdecl(1);
$past.name(~$<desigilname>);
@BLOCK[0].symbol($past.name(), :scope('lexical'));
}
elsif $<twigil>[0] eq '*' {
$past.scope('contextual');
$past.viviself(
PAST::Var.new(
Expand Down
2 changes: 1 addition & 1 deletion dotnet/compiler/Grammar.pm
Expand Up @@ -262,7 +262,7 @@ token variable {
| $<sigil>=['$'] $<desigilname>=[<[/_!]>]
}

token sigil { <[$@%&]> }
token sigil { <[$@%&]> | '::' }

token twigil { <[*!?]> }

Expand Down

0 comments on commit 8948ea1

Please sign in to comment.