[plt-scheme] Reporting syntax-error to a DrScheme tool
Is errortrace annotating the code?
Robby
At Wed, 01 Mar 2006 01:03:28 +0100, Jens Axel Søgaard wrote:
> 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
> (parser
> (src-pos)
> ; TODO: wire the error function to the language level
> (error (lambda (a name val start end)
> (raise-read-error "read-error"
> (file-path)
> (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)
> (run-in-user-thread
> (lambda ()
> (error-display-handler
> (drscheme:debug:make-debug-error-display-handler
> (error-display-handler)))
> (void))))
>
> When I click "Execute" on a file with syntax-error all I get is
>
> read-error
>
> in the interaction window.
>
> What piece of the puzzle is missing?
>
> --
> Jens Axel Søgaard
>
>
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme