Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add a way to mark types on QAST nodes if known.
  • Loading branch information
jnthn committed Apr 5, 2012
1 parent ff18cac commit 3e9ecfc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/QAST/Node.nqp
@@ -1,6 +1,7 @@
class QAST::Node is NQPCapture {
has str $!name;
has $!node;
has $!type;

method new(*@children, *%options) {
my $new := self.CREATE();
Expand All @@ -16,5 +17,5 @@ class QAST::Node is NQPCapture {
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) }
method type(*@value) { $!type := @value[0] if @value; $!type }
}

0 comments on commit 3e9ecfc

Please sign in to comment.