From acfb3a89928ee33de4f6fc5b426731494e219a1c Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sat, 26 Aug 2017 01:30:04 -0500 Subject: [PATCH] strings.parser: Add character escapes for :[{(. You will need to bootstrap or change them to ``char: :`` then ``char: \:`` in strings.parser. --- core/io/pathnames/pathnames.factor | 2 +- core/strings/parser/parser.factor | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/io/pathnames/pathnames.factor b/core/io/pathnames/pathnames.factor index 2d382e49d1..7b62da4b1e 100644 --- a/core/io/pathnames/pathnames.factor +++ b/core/io/pathnames/pathnames.factor @@ -65,7 +65,7 @@ ERROR: no-parent-directory path ; { { [ dup "\\\\?\\" head? ] [ t ] } { [ dup length 2 < ] [ f ] } - { [ dup second CHAR: : = ] [ t ] } + { [ dup second CHAR: \: = ] [ t ] } [ f ] } cond ; diff --git a/core/strings/parser/parser.factor b/core/strings/parser/parser.factor index 056d6527c4..6b8bd10570 100644 --- a/core/strings/parser/parser.factor +++ b/core/strings/parser/parser.factor @@ -22,6 +22,10 @@ ERROR: bad-escape char ; { CHAR: 0 CHAR: \0 } { CHAR: \\ CHAR: \\ } { CHAR: \" CHAR: \" } + { CHAR: \: CHAR: \: } + { CHAR: \[ CHAR: \[ } + { CHAR: \{ CHAR: \{ } + { CHAR: \( CHAR: \( } } ?at [ bad-escape ] unless ; SYMBOL: name>char-hook