aboutsummaryrefslogtreecommitdiff
path: root/ps/step0_repl.ps
diff options
context:
space:
mode:
Diffstat (limited to 'ps/step0_repl.ps')
-rw-r--r--ps/step0_repl.ps11
1 files changed, 3 insertions, 8 deletions
diff --git a/ps/step0_repl.ps b/ps/step0_repl.ps
index 9dbf107..046e5a1 100644
--- a/ps/step0_repl.ps
+++ b/ps/step0_repl.ps
@@ -1,4 +1,6 @@
% read
+/_readline { print flush (%stdin) (r) file 99 string readline } def
+
/READ {
% just "return" the input string
/str exch def
@@ -26,17 +28,10 @@
% repl
/REP { READ (stub env) EVAL PRINT } def
-/stdin (%stdin) (r) file def
-
{ % loop
- (user> ) print flush
-
- stdin 99 string readline
-
+ (user> ) _readline
not { exit } if % exit if EOF
- %(\ngot line: ) print dup print (\n) print flush
-
REP print (\n) print
} bind loop