Skip to content

Instantly share code, notes, and snippets.

@peschwa
Created November 9, 2014 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peschwa/4b001dec921220da0051 to your computer and use it in GitHub Desktop.
Save peschwa/4b001dec921220da0051 to your computer and use it in GitHub Desktop.
$ git diff nom -- src/Perl6/World.nqp
diff --git a/src/Perl6/World.nqp b/src/Perl6/World.nqp
index 327fc4e..6d8ab69 100644
--- a/src/Perl6/World.nqp
+++ b/src/Perl6/World.nqp
@@ -1654,6 +1654,20 @@ class Perl6::World is HLL::World {
}
return join(' ', @pieces);
}
+ elsif nqp::istype($ast[0], QAST::Want) && $ast[0].has_compile_time_value {
+ return nqp::unbox_s($ast[0].compile_time_value);
+ }
+ elsif nqp::istype($ast, QAST::Stmts) {
+ my $var := $ast;
+ while !nqp::istype($var, QAST::Var) {
+ $var := $var[0];
+ }
+ my $value;
+ try {
+ $value := self.find_symbol([$var.name]);
+ }
+ return $value;
+ }
else {
$/.CURSOR.panic($mkerr());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment