From 4c14045c5dbc5035a5dfc3f3b7c20baf8c3dcaf5 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 10 Apr 2008 00:22:38 +0000 Subject: [PATCH] syntax coloring for prefabs svn: r9229 --- collects/syntax-color/scheme-lexer.ss | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/collects/syntax-color/scheme-lexer.ss b/collects/syntax-color/scheme-lexer.ss index c892d7c699..492c10e4d4 100644 --- a/collects/syntax-color/scheme-lexer.ss +++ b/collects/syntax-color/scheme-lexer.ss @@ -134,8 +134,9 @@ [reader-command (:or (:: "#" c s) (:: "#" c i))] [sharing (:or (:: "#" (make-uinteger digit10) "=") - (:: "#" (make-uinteger digit10) "#"))]) - + (:: "#" (make-uinteger digit10) "#"))] + + [list-prefix (:or "" "#hash" "#hasheq" "#s" (:: "#" (:* digit10)))]) (define-lex-trans make-num (syntax-rules () @@ -278,11 +279,11 @@ ["#|" (read-nested-comment 1 start-pos input-port)] [script (ret lexeme 'comment #f start-pos end-pos)] - [(:: (:or "" "#hash" "#hasheq" (:: "#" (:* digit10))) "(") + [(:: list-prefix "(") (ret lexeme 'parenthesis '|(| start-pos end-pos)] - [(:: (:or "" "#hash" "#hasheq" (:: "#" (:* digit10))) "[") + [(:: list-prefix "[") (ret lexeme 'parenthesis '|[| start-pos end-pos)] - [(:: (:or "" "#hash" "#hasheq" (:: "#" (:* digit10))) "{") + [(:: list-prefix "{") (ret lexeme 'parenthesis '|{| start-pos end-pos)] [(:or ")" "]" "}") (ret lexeme 'parenthesis (string->symbol lexeme) start-pos end-pos)]