Permalink
Browse files

add .evaluate_unquotes to BVal and Block

  • Loading branch information...
1 parent 2b1bcbb commit 2f7b14d66b5777f7f4d680cdbd787d284828c1f2 @masak masak committed Aug 30, 2012
Showing with 15 additions and 0 deletions.
  1. +4 −0 src/QAST/BVal.nqp
  2. +11 −0 src/QAST/Block.nqp
View
@@ -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
+ }
}
View
@@ -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.