Skip to content

Commit efa345e

Browse files
committed
Make BVal consistent with the various other Val nodes. Also fix compilation of it.
1 parent 2a41c7d commit efa345e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/QAST/BVal.nqp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
class QAST::BVal is QAST::Node { has $!block; method block(*@value) { $!block := @value[0] if @value; $!block }}
1+
class QAST::BVal is QAST::Node {
2+
has $!value;
3+
method value(*@value) { $!value := @value[0] if @value; $!value }
4+
}

src/QAST/Compiler.nqp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,10 @@ class QAST::Compiler is HLL::Compiler {
377377
}
378378

379379
multi method as_post(QAST::BVal $node) {
380-
my $cuid := self.escape($node.block.cuid);
380+
my $cuid := self.escape($node.value.cuid);
381381
my $reg := $*REGALLOC.fresh_p();
382382
my $ops := self.post_new('Ops', :result($reg));
383-
$ops.push_pirop(".const 'Sub' $reg = '$cuid'");
383+
$ops.push_pirop(".const 'Sub' $reg = $cuid");
384384
$ops;
385385
}
386386

0 commit comments

Comments
 (0)