Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
move node() from QAST::Regex to QAST::Node; add $!node to QAST::Node
  • Loading branch information
diakopter committed Nov 16, 2011
1 parent 5680b10 commit cecd970
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/QAST/Node.nqp
@@ -1,5 +1,6 @@
class QAST::Node is NQPCapture {
has $!name;
has $!node;

method new(*@children, *%options) {
my $new := self.CREATE();
Expand All @@ -12,6 +13,7 @@ class QAST::Node is NQPCapture {
}

method name(*@value) { $!name := @value[0] if @value; $!name }
method node(*@value) { $!node := @value[0] if @value; $!node }
method push($value) { nqp::push(self.list, $value) }
method unshift($value) { nqp::unshift(self.list, $value) }
}
Expand Down
3 changes: 1 addition & 2 deletions src/QAST/Regex.nqp
Expand Up @@ -6,13 +6,12 @@ class QAST::Regex is QAST::Node {
has $!min;
has $!max;

method node(*@value) { }
method rxtype(*@value) { $!rxtype := @value[0] if @value; $!rxtype }
method subtype(*@value) { $!subtype := @value[0] if @value; $!subtype }
method backtrack(*@value) { $!backtrack := @value[0] if @value; $!backtrack }
method negate(*@value) { $!negate := @value[0] if @value; $!negate }
method max(*@value) { $!max := @value[0] if @value; $!max }
method min(*@value) { $!min := @value[0] if @value; $!min }
method max(*@value) { $!max := @value[0] if @value; $!max }

}

0 comments on commit cecd970

Please sign in to comment.