From 3a030342f62ca44da2130f19f75e19e4ee169f33 Mon Sep 17 00:00:00 2001 From: Jonathan Worthington Date: Wed, 17 Mar 2010 01:06:15 +0100 Subject: [PATCH] Get the $bottle ~~ s[full] = 'empty' syntax working too. --- src/Perl6/Actions.pm | 2 +- src/Perl6/Grammar.pm | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Perl6/Actions.pm b/src/Perl6/Actions.pm index a96f3155a5e..8186a2104bb 100644 --- a/src/Perl6/Actions.pm +++ b/src/Perl6/Actions.pm @@ -2141,7 +2141,7 @@ method quote:sym($/) { my $closure_ast := PAST::Block.new( PAST::Stmts.new(), PAST::Stmts.new( - $.ast + $ ?? $.ast !! $.ast ) ); my $closure := create_code_object($closure_ast, 'Block', 0, ''); diff --git a/src/Perl6/Grammar.pm b/src/Perl6/Grammar.pm index c1466b77b3e..4f67c1b66b0 100644 --- a/src/Perl6/Grammar.pm +++ b/src/Perl6/Grammar.pm @@ -991,10 +991,12 @@ token quote:sym { } token quote:sym { >> - '/' - - - + [ + | '/' + | '[' ']' + <.ws> [ '=' || <.panic: "Missing assignment operator"> ] + <.ws> + ] } token quote_escape:sym<$> { }