-
-
Save hoelzro/f6ef23c1234377cf7b4e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Perl6/Compiler.nqp b/src/Perl6/Compiler.nqp | |
index 3ed4ace..97e344b 100644 | |
--- a/src/Perl6/Compiler.nqp | |
+++ b/src/Perl6/Compiler.nqp | |
@@ -222,6 +222,8 @@ class Perl6::Compiler is HLL::Compiler { | |
} | |
method readline($stdin, $stdout, $prompt) { | |
+ my $line; | |
+ | |
try { | |
my $ctx := self.context(); | |
if $ctx { | |
@@ -252,23 +254,22 @@ class Perl6::Compiler is HLL::Compiler { | |
sorted_set_insert($!completions, $k); | |
} | |
} | |
- nqp::say('passed ctx stuff'); | |
- my $line := $!linenoise($prompt); | |
- nqp::say('passed linenoise init'); | |
+ $line := $!linenoise($prompt); | |
if $line.defined { | |
$!linenoise_add_history($line); | |
- $line | |
} else { | |
- nqp::null_s() | |
+ $line := nqp::null_s() | |
} | |
CATCH { | |
nqp::say('something failed'); | |
my $super := nqp::findmethod(HLL::Compiler, 'readline'); | |
- $super(self, $stdin, $stdout, $prompt); | |
+ $line := $super(self, $stdin, $stdout, $prompt); | |
} | |
} | |
+ | |
+ $line | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment