Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created July 23, 2010 20:40
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 jnthn/488005 to your computer and use it in GitHub Desktop.
Save jnthn/488005 to your computer and use it in GitHub Desktop.
diff --git a/src/Perl6/Actions.pm b/src/Perl6/Actions.pm
index 167b343..f898b75 100644
--- a/src/Perl6/Actions.pm
+++ b/src/Perl6/Actions.pm
@@ -2591,11 +2591,11 @@ method typename($/) {
}
method quotepair($/) {
- my $h := pir::new__ps('Hash');
- $h<key> := $*key;
- $h<value> := $*value;
-
- make $h;
+ unless $*value ~~ PAST::Node {
+ $*value := PAST::Val.new( :value($*value) );
+ }
+ $*value.named(~$*key);
+ make $*value;
}
method quote:sym<apos>($/) { make $<quote_EXPR>.ast; }
@@ -2657,7 +2657,7 @@ method quote:sym<s>($/) {
$regex, $closure
);
for $<quotepair> {
- $past.push(PAST::Val.new(:named(~$_.ast<key>), :value($_.ast<value>)));
+ $past.push($_.ast);
}
make $past;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment