diff options
| author | Joel Martin <github@martintribe.org> | 2014-04-01 21:50:24 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2014-04-01 21:50:24 -0500 |
| commit | 950e3c765e30648de34cfc4f65fffdce06f0727f (patch) | |
| tree | 3e66b70a71a5cfa01671830d80d7ea7926509b2d /ps/step0_repl.ps | |
| parent | 704194e12c5080f5c6842416a78fe7efa09da068 (diff) | |
| download | mal-950e3c765e30648de34cfc4f65fffdce06f0727f.tar.gz mal-950e3c765e30648de34cfc4f65fffdce06f0727f.zip | |
PS: add stepA_more.
Sync other steps. In particular, self reference in function definition
and putting readline into _readline function.
Diffstat (limited to 'ps/step0_repl.ps')
| -rw-r--r-- | ps/step0_repl.ps | 11 |
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 |
