From 413dc67985fc6592cba170d73d906b2a549a4d00 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Wed, 23 Sep 2009 17:55:54 -0500 Subject: [PATCH] Put bad escape code in the bad-escape error --- basis/debugger/debugger.factor | 4 +++- core/strings/parser/parser.factor | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/basis/debugger/debugger.factor b/basis/debugger/debugger.factor index 1e08896e8d..4888896866 100644 --- a/basis/debugger/debugger.factor +++ b/basis/debugger/debugger.factor @@ -319,7 +319,9 @@ M: lexer-error error-help M: bad-effect summary drop "Bad stack effect declaration" ; -M: bad-escape summary drop "Bad escape code" ; +M: bad-escape error. + "Bad escape code: \\" write + char>> 1string print ; M: bad-literal-tuple summary drop "Bad literal tuple" ; diff --git a/core/strings/parser/parser.factor b/core/strings/parser/parser.factor index b8aadc608c..49287ed112 100644 --- a/core/strings/parser/parser.factor +++ b/core/strings/parser/parser.factor @@ -5,7 +5,7 @@ namespaces parser sequences splitting strings arrays math.order ; IN: strings.parser -ERROR: bad-escape ; +ERROR: bad-escape char ; : escape ( escape -- ch ) H{ @@ -19,7 +19,7 @@ ERROR: bad-escape ; { CHAR: 0 CHAR: \0 } { CHAR: \\ CHAR: \\ } { CHAR: \" CHAR: \" } - } at [ bad-escape ] unless* ; + } ?at [ bad-escape ] unless ; SYMBOL: name>char-hook