Skip to content

Commit

Permalink
Get the $bottle ~~ s[full] = 'empty' syntax working too.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Mar 17, 2010
1 parent 8b09f69 commit 3a03034
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Perl6/Actions.pm
Expand Up @@ -2141,7 +2141,7 @@ method quote:sym<s>($/) {
my $closure_ast := PAST::Block.new(
PAST::Stmts.new(),
PAST::Stmts.new(
$<quote_EXPR>.ast
$<quote_EXPR> ?? $<quote_EXPR>.ast !! $<EXPR>.ast
)
);
my $closure := create_code_object($closure_ast, 'Block', 0, '');
Expand Down
10 changes: 6 additions & 4 deletions src/Perl6/Grammar.pm
Expand Up @@ -991,10 +991,12 @@ token quote:sym<m> {
}
token quote:sym<s> {
<sym> >>
'/'
<p6regex=.LANG('Regex','nibbler')>
<?[/]>
<quote_EXPR: ':qq'>
[
| '/' <p6regex=.LANG('Regex','nibbler')> <?[/]> <quote_EXPR: ':qq'>
| '[' <p6regex=.LANG('Regex','nibbler')> ']'
<.ws> [ '=' || <.panic: "Missing assignment operator"> ]
<.ws> <EXPR('i')>
]
}

token quote_escape:sym<$> { <?[$]> <?quotemod_check('s')> <variable> }
Expand Down

0 comments on commit 3a03034

Please sign in to comment.