Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
REPL6: Allow the REPL to signal multi-line mode via kwargs
This is seriously LTA, but returning the sentinel value doesn't
seem to work, probably due to containerization or something.  I
never really liked the sentinel solution, so I'll be forced to
think of a better way to do this overall before I merge back into
nom
  • Loading branch information
hoelzro committed Mar 4, 2016
1 parent 377a9ae commit 3155d15
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Perl6/Compiler.nqp
Expand Up @@ -347,7 +347,11 @@ class Perl6::Compiler is HLL::Compiler {
method eval($code, *@args, *%adverbs) {
my $super := nqp::findmethod(HLL::Compiler, 'eval');
if $!p6repl {
return $!p6repl.eval(self, $super, $code, @args, %adverbs);
my $result := $!p6repl.eval(self, $super, $code, @args, %adverbs);
if %adverbs<more_input> {
return self.needs-more-input();
}
return $result;
}
unless $!multi-line-enabled {
return $super(self, $code, |@args, |%adverbs);
Expand Down

0 comments on commit 3155d15

Please sign in to comment.