Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

make macro expansion ignore empty ASTs

Fixes RT #115506.
  • Loading branch information...
commit 02688057bb7e44557c614155370cd57209733e1c 1 parent 4925c91
@masak masak authored
Showing with 8 additions and 7 deletions.
  1. +8 −7 src/Perl6/Actions.pm
View
15 src/Perl6/Actions.pm
@@ -3457,14 +3457,15 @@ class Perl6::Actions is HLL::Actions does STDActions {
action => 'macro application',
);
}
- my $block := QAST::Block.new(
- :blocktype<raw>,
- nqp::getattr(
- pir::perl6_decontainerize__PP($macro_ast),
- $ast_class,
- '$!past'
- )
+ my $macro_ast_qast := nqp::getattr(
+ pir::perl6_decontainerize__PP($macro_ast),
+ $ast_class,
+ '$!past'
);
+ unless nqp::defined($macro_ast_qast) {
+ return QAST::Var.new(:name('Nil'), :scope('lexical'));
+ }
+ my $block := QAST::Block.new(:blocktype<raw>, $macro_ast_qast);
$*W.add_quasi_fixups($macro_ast, $block);
my $past := QAST::Stmts.new(
$block,
Please sign in to comment.
Something went wrong with that request. Please try again.