Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Simplify and correct moreinput.
"nil" doesn't exist, and the conditional was probably always true anyway.
  • Loading branch information
peschwa committed Mar 30, 2015
1 parent f26fcba commit fcf012f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Perl6/Grammar.nqp
Expand Up @@ -517,18 +517,18 @@ grammar Perl6::Grammar is HLL::Grammar does STD {

token MOREINPUT {
[
<?{ $*MOREINPUT_BLOCK_DEPTH == 0 }> <?MARKER('nomoreinput')>
<?{ $*MOREINPUT_BLOCK_DEPTH == 0 }>
<?MARKER('nomoreinput')>
{ $*MOREINPUT_BLOCK_DEPTH := 0 }
|| <?>
]
}

method moreinput() {
return nil if self.MARKED('nomoreinput') && $*MOREINPUT_BLOCK_DEPTH == 0;
return NQPMu if self.MARKED('nomoreinput') && $*MOREINPUT_BLOCK_DEPTH == 0;
my $old_cursor := self;
$*moreinput(self) if $*moreinput;
$old_cursor.target eq self.target
?? NQPMu
!! self
NQPMu
}

token vws {
Expand Down

0 comments on commit fcf012f

Please sign in to comment.