Created
July 23, 2010 20:40
-
-
Save jnthn/488005 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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