strings.parser: simplify next-escape.

db4
John Benediktsson 2014-06-03 21:04:05 -07:00
parent ac6aa3221b
commit f61bdd0bb4
1 changed files with 4 additions and 4 deletions

View File

@ -43,10 +43,10 @@ name>char-hook [
] if ;
: next-escape ( str -- ch str' )
dup first {
{ CHAR: u [ rest-slice unicode-escape ] }
{ CHAR: x [ rest-slice hex-escape ] }
[ drop unclip-slice escape swap ]
unclip-slice {
{ CHAR: u [ unicode-escape ] }
{ CHAR: x [ hex-escape ] }
[ escape swap ]
} case ;
<PRIVATE