[plt-scheme] Reporting syntax-error to a DrScheme tool

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Tue Feb 28 19:03:28 EST 2006

Hi all,

I am attempting to hook up a css mode for DrScheme
and am missing the piece that makes DrScheme highlight
errors in the definition window.

In the parser I use

   ; css-parser : (-> token) -> sexp
   (define css-parser
      ; TODO: wire the error function to the language level
      (error    (lambda (a name val start end)
                  (raise-read-error "read-error"
                                    (position-line start)
                                    (position-col start)
                                    (position-offset start)
                                    (- (position-offset end)
                                       (position-offset start)))))

to raise an read-error.

In tool.ss I have the following on-execute method:

           (define/public (on-execute settings run-in-user-thread)
             ; (read-case-sensitive #f)
              (lambda ()

When I click "Execute" on a file with syntax-error all I get is


in the interaction window.

What piece of the puzzle is missing?

Jens Axel Søgaard

Posted on the users mailing list.