add backspace support to parse-until

FossilOrigin-Name: e60d47a21518c155c9def557c6b7f249dc85316a57753898e119aff7edc6f292
This commit is contained in:
crc 2017-12-01 02:23:12 +00:00
parent 96a2252e53
commit 2aef61474e
2 changed files with 5 additions and 3 deletions

File diff suppressed because one or more lines are too long

View file

@ -361,7 +361,9 @@ once for each line in a file. This makes some things trivial. E.g., a simple
~~~
{{
:cycle (q-qc) repeat getc dup-pair swap call not 0; drop buffer:add again ;
:gather (c-)
dup [ #8 eq? ] [ #127 eq? ] bi or [ drop ] [ buffer:add ] choose ;
:cycle (q-qc) repeat getc dup-pair swap call not 0; drop gather again ;
---reveal---
:parse-until (q-s)
[ s:empty buffer:set cycle drop-pair buffer:start ] buffer:preserve ;