Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Get a basic cut of contextuals working again. Fixes the contextuals t…
…ests entirely plus another test file that depended on them.
  • Loading branch information
jnthn committed Aug 7, 2012
1 parent e714e6e commit 64f922a
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/NQPQ/Actions.pm
Expand Up @@ -532,14 +532,18 @@ class NQP::Actions is HLL::Actions {
$past.viviself( vivitype( $<sigil> ) );
}
elsif $<twigil>[0] eq '*' {
my $global_fallback := lexical_package_lookup(['GLOBAL', ~$<sigil> ~ $<desigilname>], $/);
$global_fallback.viviself(PAST::Op.new(
'Contextual ' ~ ~$/ ~ ' not found',
:pirop('die')
));
$past := PAST::Var.new(
#my $global_fallback := lexical_package_lookup(['GLOBAL', ~$<sigil> ~ $<desigilname>], $/);
#$global_fallback.viviself(PAST::Op.new(
# 'Contextual ' ~ ~$/ ~ ' not found',
# :pirop('die')
#));
# XXX Should try looking in global before dieing.
my $global_fallback := QAST::Op.new(
:op('die_s'),
QAST::SVal.new( :value('Contextual ' ~ ~$/ ~ ' not found') ));
$past := QAST::VarWithFallback.new(
:name(~@name.pop), :scope('contextual'),
:viviself($global_fallback)
:fallback($global_fallback)
);
}
elsif $<twigil>[0] eq '!' {
Expand Down

0 comments on commit 64f922a

Please sign in to comment.