[plt-scheme] Feature request: syntax coloring of . , ,@ #, #,@

From: Derick Eddington (derick.eddington at gmail.com)
Date: Fri Jan 18 21:06:54 EST 2008

On Fri, 2007-12-28 at 11:42 +0000, Dave Gurnell wrote:
> On a related note, I've been really wanting some #; colouring lately  

To make the s-expression after the #; colorized as a comment, this seems
to do it right:

--- scheme-lexer.ss     2008-01-18 15:55:01.000000000 -0800
+++ scheme-lexer.ss     2008-01-18 17:52:15.000000000 -0800
@@ -234,6 +234,10 @@
         (else
          (read-char i)
          (cons next (special-read-line i))))))
+  
+  (define (read-sexp-comment start-pos input-port)
+    (read input-port)
+    (values "" 'sexp-comment #f start-pos (get-offset input-port)))
           
   (define (get-here-string start-pos i)
     (let* ((ender (list->string (special-read-line i)))
@@ -274,7 +278,7 @@
      [line-comment
       (ret lexeme 'comment #f start-pos end-pos)]
      ["#;"
-      (ret lexeme 'sexp-comment #f start-pos end-pos)]
+      (read-sexp-comment (position-offset start-pos) input-port)]
      ["#|" (read-nested-comment 1 start-pos input-port)]
      [script
       (ret lexeme 'comment #f start-pos end-pos)]


-- 
: Derick
----------------------------------------------------------------



Posted on the users mailing list.