Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

$.foo, @.foo and %.foo should contextualize appropriately.

  • Loading branch information...
commit 6ef66c9521b14f33ded88c3da8569032488d2442 1 parent fa1ca28
Jonathan Worthington authored April 21, 2012

Showing 1 changed file with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. 7  src/Perl6/Actions.pm
7  src/Perl6/Actions.pm
@@ -1117,6 +1117,13 @@ class Perl6::Actions is HLL::Actions {
1117 1117
             $past.pasttype('callmethod');
1118 1118
             $past.name($desigilname);
1119 1119
             $past.unshift(PAST::Var.new( :name('self'), :scope('lexical_6model') ));
  1120
+            # Contextualize based on sigil.
  1121
+            $past := PAST::Op.new(
  1122
+                :pasttype('callmethod'),
  1123
+                :name($sigil eq '@' ?? 'list' !!
  1124
+                      $sigil eq '%' ?? 'hash' !!
  1125
+                      'item'),
  1126
+                $past);
1120 1127
         }
1121 1128
         elsif $twigil eq '^' || $twigil eq ':' {
1122 1129
             $past := add_placeholder_parameter($/, $sigil, $desigilname,

0 notes on commit 6ef66c9

Please sign in to comment.
Something went wrong with that request. Please try again.