We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfbc76f commit 395aa0aCopy full SHA for 395aa0a
src/QAST/Compiler.nqp
@@ -163,6 +163,23 @@ class QAST::Compiler is HLL::Compiler {
163
164
proto method as_post(*@args, *%_) { * }
165
166
+ multi method as_post(QAST::CompUnit $cu) {
167
+ # Should have a single child which is the outer block.
168
+ if +@($cu) != 1 || !nqp::istype($cu[0], QAST::Block) {
169
+ nqp::die("QAST::CompUnit should have one child that is a QAST::Block");
170
+ }
171
+
172
+ # Compile the block.
173
+ my $block_post := self.as_post($cu[0]);
174
175
+ # Apply HLL if any.
176
+ if $cu.hll {
177
+ $block_post.hll($cu.hll);
178
179
180
+ $block_post
181
182
183
multi method as_post(QAST::Block $node) {
184
# Build the POST::Sub.
185
my $sub;
0 commit comments