From 8473f598819cdfbd422eba9fc157bac088c2a4a6 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sat, 16 Jun 2018 10:05:36 -0700 Subject: [PATCH] colorer tweak --- brag/private/colorer.rkt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/brag/private/colorer.rkt b/brag/private/colorer.rkt index f59edc6..93c4545 100644 --- a/brag/private/colorer.rkt +++ b/brag/private/colorer.rkt @@ -8,7 +8,9 @@ ;; need to lex whitespace to keep srclocs accurate ;; (for DrRacket selections etc) [whitespace (token 'WHITE lexeme)] - [(:or (from/to "'" "'") (from/to "\"" "\"")) (token 'LIT lexeme)] + [(:or (:: "\"" "\\" "\"" "\"") ; string containg double-quote = "\"" + (from/to "'" "'") + (from/to "\"" "\"")) (token 'LIT lexeme)] [(:or (char-set "()[]{}|+*:?") hide-char splice-char) (token 'MISC lexeme)] [(:seq (:or "#" ";") (complement (:seq (:* any-char) NL (:* any-char))) (:or NL "")) (token 'COMMENT lexeme)] [id (token 'ID lexeme)]