Skip to content

Instantly share code, notes, and snippets.

@timo
Created September 13, 2015 21:04
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 timo/a9570cb6beee419ec2a1 to your computer and use it in GitHub Desktop.
Save timo/a9570cb6beee419ec2a1 to your computer and use it in GitHub Desktop.
diff --git a/src/Perl6/Actions.nqp b/src/Perl6/Actions.nqp
index 736d43a..35130e9 100644
--- a/src/Perl6/Actions.nqp
+++ b/src/Perl6/Actions.nqp
@@ -2386,7 +2386,7 @@ Compilation unit '$file' contained the following violations:
elsif $<signature> {
# Go over the params and declare the variable defined in them.
my class FakeOfType { has $!type; method ast() { $!type } }
- my $list := QAST::Op.new( :op('call'), :name('&infix:<,>') );
+ my $list := QAST::Stmts.new( );
my @params := $<signature>.ast<parameters>;
my $common_of := $*OFTYPE;
for @params {
@@ -2443,9 +2443,13 @@ Compilation unit '$file' contained the following violations:
QAST::Op.new( :op('p6stateinit') ),
$list, $orig_list);
}
+
+ make $list;
+ } else {
+ my $want := QAST::Want.new( QAST::Op.new( :op('call'), :name('&infix:<,>') ), 'v', $list );
+ make $want;
}
- make $list;
}
elsif $<deftermnow> {
# 'my \foo' style declaration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment