Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
support undef
  • Loading branch information
FROGGS committed Apr 12, 2013
1 parent 2d7dcbb commit 09e6da4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions lib/Perl6/P5Actions.pm
Expand Up @@ -5095,6 +5095,13 @@ class Perl6::P5Actions is HLL::Actions does STDActions {
make QAST::Op.new(:node($/), :op<call>, $metapast, $args);
}

method term:sym<undef>($/) {
$*W.get_env('V5DEBUG') && say("term:sym<undef>($/)");
my $mu := QAST::WVal.new( :value($*W.find_symbol(['Mu'])) );
make $<EXPR> ?? QAST::Op.new( :op('p6store'), $<EXPR>[0].ast, $mu )
!! $mu
}

method term:sym<filetest>($/) {
$*W.get_env('V5DEBUG') && say("term:sym<filetest>($/)");
make QAST::Op.new(
Expand Down
4 changes: 2 additions & 2 deletions lib/Perl6/P5Grammar.pm
Expand Up @@ -3480,8 +3480,8 @@ grammar Perl6::P5Grammar is HLL::Grammar does STD5 {
# token term:sym<ucfirst>
# { <sym> » <?before \s*> <.ws> <EXPR('q=')>? }

# token term:sym<undef>
# { <sym> » <?before \s*> <.ws> <EXPR('q=')>? }
token term:sym<undef>
{ <sym> » <?before \s*> <.ws> <EXPR('q=')>? }

# token term:sym<untie>
# { <sym> » <?before \s*> <.ws> <EXPR('q=')>? }
Expand Down

0 comments on commit 09e6da4

Please sign in to comment.