Browse files

Stub phaser traits: alas, dispatch is not yet successful

  • Loading branch information...
1 parent 17f6fe0 commit f4b2ce47d9bead932483e5310b54c75db6ce7462 @lizmat lizmat committed Jul 26, 2013
Showing with 58 additions and 4 deletions.
  1. +58 −4 src/core/Variable.pm
View
62 src/core/Variable.pm
@@ -1,35 +1,89 @@
+# Variable traits come here, not in traits.pm, since we declare Variable
+# in the setting rather than BOOTSTRAP.
+
my class Variable {
has str $.name;
has str $.scope;
has $.var is rw;
has $.block;
}
-# Variable traits come here, not in traits.pm, since we declare Variable
-# in the setting rather than BOOTSTRAP.
+# container traits
multi trait_mod:<is>(Variable:D $v, :$default!) {
$v.var = $default; # make sure we start with the default
nqp::getattr($v.var, $v.VAR.WHAT, '$!descriptor').set_default($default);
}
-
multi trait_mod:<is>(Variable:D $v, :$readonly!) {
nqp::getattr($v.var, $v.VAR.WHAT, '$!descriptor').set_rw(!$readonly);
}
multi trait_mod:<is>(Variable:D $v, :$rw!) {
nqp::getattr($v.var, $v.VAR.WHAT, '$!descriptor').set_rw($rw);
}
-
multi trait_mod:<is>(Variable:D $v, Mu:U $of ) {
nqp::getattr($v.var, $v.VAR.WHAT, '$!descriptor').set_of($of);
}
multi trait_mod:<of>(Variable:D $v, Mu:U $of ) {
nqp::getattr($v.var, $v.VAR.WHAT, '$!descriptor').set_of($of);
}
+# visibility traits
multi trait_mod:<is>(Variable:D $v, :$dynamic!) {
# not sure what needs to happen here yet
}
multi trait_mod:<is>(Variable:D $v, :$context!) {
# not sure what needs to happen here yet
# unspecced, but spectested
}
+
+# phaser traits
+multi trait_mod:<will>(Variable:D $v, Block:D :$begin ) {
+# not sure what needs to happen here yet
+}
+multi trait_mod:<will>(Variable:D $v, Block:D :$check ) {
+# not sure what needs to happen here yet
+}
+multi trait_mod:<will>(Variable:D $v, Block:D :$final ) {
+# not sure what needs to happen here yet
+}
+multi trait_mod:<will>(Variable:D $v, Block:D :$init ) {
+# not sure what needs to happen here yet
+}
+multi trait_mod:<will>(Variable:D $v, Block:D :$end ) {
+# not sure what needs to happen here yet
+}
+multi trait_mod:<will>(Variable:D $v, Block:D :$enter ) {
+# not sure what needs to happen here yet
+}
+multi trait_mod:<will>(Variable:D $v, Block:D :$leave ) {
+# not sure what needs to happen here yet
+}
+multi trait_mod:<will>(Variable:D $v, Block:D :$keep ) {
+# not sure what needs to happen here yet
+}
+multi trait_mod:<will>(Variable:D $v, Block:D :$undo ) {
+# not sure what needs to happen here yet
+}
+multi trait_mod:<will>(Variable:D $v, Block:D :$first ) {
+# not sure what needs to happen here yet
+}
+multi trait_mod:<will>(Variable:D $v, Block:D :$next ) {
+# not sure what needs to happen here yet
+}
+multi trait_mod:<will>(Variable:D $v, Block:D :$last ) {
+# not sure what needs to happen here yet
+}
+multi trait_mod:<will>(Variable:D $v, Block:D :$pre ) {
+# not sure what needs to happen here yet
+}
+multi trait_mod:<will>(Variable:D $v, Block:D :$post ) {
+# not sure what needs to happen here yet
+}
+multi trait_mod:<will>(Variable:D $v, Block:D :$catch ) {
+# not sure what needs to happen here yet
+}
+multi trait_mod:<will>(Variable:D $v, Block:D :$control ) {
+# not sure what needs to happen here yet
+}
+multi trait_mod:<will>(Variable:D $v, Block:D :$compose ) {
+# not sure what needs to happen here yet
+}

0 comments on commit f4b2ce4

Please sign in to comment.