diff --git a/src/NQP/Actions.pm b/src/NQP/Actions.pm index e6edb94..45020cd 100644 --- a/src/NQP/Actions.pm +++ b/src/NQP/Actions.pm @@ -71,6 +71,10 @@ method pblock($/) { make $.ast; } +method block($/) { + make $.ast; +} + method blockoid($/) { my $past := $.ast; my $BLOCK := @BLOCK.shift; @@ -159,8 +163,8 @@ method statement_prefix:sym($/) { } method blorst($/) { - make $ - ?? block_immediate($.ast) + make $ + ?? block_immediate($.ast) !! $.ast; } diff --git a/src/NQP/Grammar.pm b/src/NQP/Grammar.pm index 2ed6a88..41c710b 100644 --- a/src/NQP/Grammar.pm +++ b/src/NQP/Grammar.pm @@ -94,7 +94,13 @@ token xblock { } token pblock { - + [ || <.panic: 'Missing block'> ] + <.newpad> + +} + +token block { + [ || <.panic: 'Missing block'> ] <.newpad> } @@ -162,7 +168,7 @@ proto token statement_prefix { <...> } token statement_prefix:sym { } token blorst { - \s <.ws> [ | ] + \s <.ws> [ | ] } ## Terms