BUG & FIX: Retro 11.7.1 - hush not working in string parser with strings containing spaces

8 views
Skip to first unread message

db0...@gmail.com

unread,
Aug 14, 2016, 8:11:48 AM8/14/16
to retro-language
Ihush 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

Regards,

Denis
Reply all
Reply to author
Forward
0 new messages