Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add .evaluate_unquotes to BVal and Block
  • Loading branch information
Carl Masak committed Aug 30, 2012
1 parent 2b1bcbb commit 2f7b14d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/QAST/BVal.nqp
@@ -1,4 +1,8 @@
class QAST::BVal is QAST::Node {
has $!value;
method value(*@value) { $!value := @value[0] if @value; $!value }

method evaluate_unquotes(@unquotes) {
self
}
}
11 changes: 11 additions & 0 deletions src/QAST/Block.nqp
Expand Up @@ -41,4 +41,15 @@ class QAST::Block is QAST::Node {
method symtable() {
%!symbol
}

method evaluate_unquotes(@unquotes) {
my $result := pir::repr_clone__PP(self);
my $i := 0;
my $elems := +@(self);
while $i < $elems {
$result[$i] := self[$i].evaluate_unquotes(@unquotes);
$i := $i + 1;
}
$result
}
}

0 comments on commit 2f7b14d

Please sign in to comment.