From ba2e1da9ab818a03785c29ea0b26d17c661d3a06 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 16 Sep 2007 01:01:33 +0000 Subject: [PATCH] syntax coloring for #lang svn: r7352 --- collects/syntax-color/scheme-lexer.ss | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/collects/syntax-color/scheme-lexer.ss b/collects/syntax-color/scheme-lexer.ss index ce020ec3b9..bb8c358692 100644 --- a/collects/syntax-color/scheme-lexer.ss +++ b/collects/syntax-color/scheme-lexer.ss @@ -41,6 +41,8 @@ [digit10 digit] [digit16 (:/ "af" "AF" "09")] + [langchar (:or (:/ "az" "AZ" "09") "+" "-" "_")] + [scheme-whitespace (:or #\newline #\return #\tab #\space #\vtab #\page)] [line-comment (:: ";" (:* (:~ #\newline)))] @@ -287,6 +289,14 @@ (ret lexeme 'constant #f start-pos end-pos)] [(:or sharing reader-command "." "," ",@" "#," "#,@") (ret lexeme 'other #f start-pos end-pos)] + + [(:: "#lang " + (:or langchar + (:: langchar (:* (:or langchar "/")) langchar))) + (ret lexeme 'other #f start-pos end-pos)] + [(:: "#lang " (:* (:& any-char (complement whitespace)))) + (ret lexeme 'error #f start-pos end-pos)] + [identifier (ret lexeme 'symbol #f start-pos end-pos)] ["#<<"