Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Check if we need more input due to trailing backslash
This is a bit of a hack, but it's good enough for this experiment
  • Loading branch information
hoelzro committed Feb 11, 2016
1 parent a59d662 commit a789a7e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/HLL/Compiler.nqp
Expand Up @@ -105,7 +105,9 @@ class HLL::Compiler does HLL::Backend::Default {
if self.input-incomplete($output) {
# Need to get more code before we execute
# Strip the trailing \, but reinstate the newline
$code := nqp::substr($code, 0, nqp::chars($code) - 1) ~ "\n";
if nqp::substr($code, 0, nqp::chars($code) - 2) eq "\\\n" {
$code := nqp::substr($code, 0, nqp::chars($code) - 2) ~ "\n";
}
if $code {
$prompt := '* ';
}
Expand Down

0 comments on commit a789a7e

Please sign in to comment.