Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Temporary change to handle True/False and Bool::True/Bool::False
directly in the grammar for now, so they're available to CORE.setting.
We can undo these when the official definitions of True/False become available.
  • Loading branch information
pmichaud committed Jul 5, 2011
1 parent f1caed6 commit df26bd3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Perl6/Actions.pm
Expand Up @@ -2024,6 +2024,11 @@ class Perl6::Actions is HLL::Actions {
make $past;
}

## temporary Bool::True/False generation
method term:sym<boolean>($/) {
make PAST::Op.new(:pirop<perl6_booleanize__Pi>, $<value> eq 'True');
}

method term:sym<self>($/) {
make PAST::Var.new( :name('self'), :node($/) );
}
Expand Down
3 changes: 3 additions & 0 deletions src/Perl6/Grammar.pm
Expand Up @@ -562,6 +562,9 @@ grammar Perl6::Grammar is HLL::Grammar {
token term:sym<*> { <sym> }
token term:sym<lambda> { <?lambda> <pblock> }

# XXX temporary Bool::True/Bool::False until we can get a permanent definition
token term:sym<boolean> { 'Bool::'? $<value>=[True|False] » }

token term:sym<undef> {
<sym> >> {}
[ <?before \h*'$/' >
Expand Down

0 comments on commit df26bd3

Please sign in to comment.