mirror of
https://github.com/adamdruppe/arsd.git
synced 2025-04-27 05:40:00 +03:00
moar audio code overhauling for reliability
This commit is contained in:
parent
a6af6c4bab
commit
f4c52cefa6
4 changed files with 222 additions and 34 deletions
8
script.d
8
script.d
|
@ -3436,6 +3436,12 @@ void repl(bool enhanced = false)(var globals) {
|
|||
import std.stdio;
|
||||
auto lines() { return stdin.byLine; }
|
||||
}
|
||||
|
||||
bool exited;
|
||||
if(globals == null)
|
||||
globals = var.emptyObject;
|
||||
globals.exit = () { exited = true; };
|
||||
|
||||
import std.algorithm;
|
||||
auto variables = (globals.payloadType() == var.Type.Object && globals._payload._object !is null) ? globals._payload._object : new PrototypeObject();
|
||||
|
||||
|
@ -3445,7 +3451,7 @@ void repl(bool enhanced = false)(var globals) {
|
|||
, "stdin");
|
||||
auto expressions = parseScript(tokens);
|
||||
|
||||
while(!expressions.empty) {
|
||||
while(!exited && !expressions.empty) {
|
||||
try {
|
||||
expressions.popFront;
|
||||
auto expression = expressions.front;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue