strings.parser: allow "\u{snowman}" or "\u{2603}".
parent
96336d2f6c
commit
1bc99066a7
|
@ -35,9 +35,13 @@ name>char-hook [
|
||||||
|
|
||||||
: unicode-escape ( str -- ch str' )
|
: unicode-escape ( str -- ch str' )
|
||||||
"{" ?head-slice [
|
"{" ?head-slice [
|
||||||
CHAR: } over index cut-slice
|
CHAR: } over index cut-slice [
|
||||||
[ >string name>char-hook get call( name -- char ) ] dip
|
dup hex> [
|
||||||
rest-slice
|
nip
|
||||||
|
] [
|
||||||
|
>string name>char-hook get call( name -- char )
|
||||||
|
] if*
|
||||||
|
] dip rest-slice
|
||||||
] [
|
] [
|
||||||
6 cut-slice [ hex> ] dip
|
6 cut-slice [ hex> ] dip
|
||||||
] if ;
|
] if ;
|
||||||
|
|
Loading…
Reference in New Issue