-
We wrap the macro argument QAST in a
Perl6::AST
object, which we incarnate immediately, since this is an object we'll only see one, due to the way parsing only proceeds forwards. This means we storeOUTER
information in thePerl6::AST
. -
Most of the time, such a
Perl6::AST
object ends up in the unquote of a quasi. It should then be stripped of itsPerl6::AST
-hood, and the original QAST gets spliced into the quasi's QAST. We wrap the spliced-in QAST in aQAST::Block
so that we can set theQAST::Block
'sOUTER
to thePerl6::AST
'sOUTER
. Since this is a runtime trait, we have to do this in the form of a fixup. -
The whole quasi is packaged up as an incarnated
Perl6::AST
. -
The macro returns, hopefully with a
Perl6::AST
. This is then similarly stripped of itsPerl6::AST
-hood, wrapped in aQAST::Block
, and re-OUTER
ed with information from thePerl6::AST
.
Created
September 8, 2012 18:29
-
-
Save masak/3678362 to your computer and use it in GitHub Desktop.
pack, unpack, pack, unpack
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment