From 1bc99066a758c6195e0c7a571ca9342d1904fb05 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Tue, 5 Apr 2016 10:19:43 -0700 Subject: [PATCH] strings.parser: allow "\u{snowman}" or "\u{2603}". --- core/strings/parser/parser.factor | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/strings/parser/parser.factor b/core/strings/parser/parser.factor index e70f9498ff..056d6527c4 100644 --- a/core/strings/parser/parser.factor +++ b/core/strings/parser/parser.factor @@ -35,9 +35,13 @@ name>char-hook [ : unicode-escape ( str -- ch str' ) "{" ?head-slice [ - CHAR: } over index cut-slice - [ >string name>char-hook get call( name -- char ) ] dip - rest-slice + CHAR: } over index cut-slice [ + dup hex> [ + nip + ] [ + >string name>char-hook get call( name -- char ) + ] if* + ] dip rest-slice ] [ 6 cut-slice [ hex> ] dip ] if ;