hush not working in string parser with strings containing spaces
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Retro |
New
|
Undecided
|
Unassigned |
Bug Description
hush is supposed to prevent Retro from echoing back the input, but it doesn't work when parsing strings with spaces. A quick example:
echo 'hush "one two" drop bye ' | retro
Gives this:
Retro 11.7.1
ok hush
ok two"
ok
ok
The fix is quite simple:
=== modified file 'image/stage2.rx'
--- image/stage2.rx 2016-06-20 10:34:45 +0000
+++ image/stage2.rx 2016-08-14 09:48:31 +0000
@@ -488,7 +488,7 @@
: end? ( $-$ ) @end @1- '" == [ chop >pad -1 ] [ 0 ] if ;
: noEat ( q- ) eatLeading? off do eatLeading? on ;
: withPad ( q- ) 32 pad 1- ! &pad &tib :is noEat &tib :devector ;
- : get ( -c ) getc dup putc ;
+ : get ( -c ) getc (echo) ;
---reveal---
: __" ( "-a )
dup withLength + !end