Hi All,

I have implemented a #lang language called bracket.
The language is installed as a collection with the raco link command.

soegaard$ /Applications/Racket\ Full\ v5.3.0.11/bin/raco link -l
User links:
 collection: "bracket"  path: "/Users/soegaard/Dropbox/GitHub/bracket/bracket"
Installation links:
soegaard$

To get proper source coloring in DrRacket, I have implemented a color-lexer.
From the documentation I see that to tell DrRacket about the color-lexer,
one must in the reader associated with the language make a get-info function.

This I have done as follows (the definitions of bracket-read and
bracket-read-syntax
are left out).

However it seems that DrRacket never calls the get-info function in question.
To check this, I added a displayln call to print a message each get-info
is called, and I never see any output from this.

Is there something else that needs to be done in order to get the color-lexer
to DrRacket? Although I have read the manual several times, I might
have missed something obvious.

The reader, parser and other related files are available here:
https://github.com/soegaard/bracket/tree/master/bracket/lang

A working test file with a program written in Bracket is here:
https://github.com/soegaard/bracket/blob/master/bracket/tests/testing.rkt


Excerpt from bracket/lang/reader.rkt :
#lang racket
(provide (rename-out [bracket-read read]
                                   [bracket-read-syntax read-syntax])
              get-info)

(require "parser.rkt")

(define (get-info in mod line col pos)
  (displayln (list 'reader/get-info in mod line col pos))
  (lambda (key default)
    (displayln (list  'reader/get-info  key default))
    (case key
      [(color-lexer)
       (dynamic-require 'bracket/lang/parser 'color-lexer)]
      [else default])))

--
Jens Axel Søgaard

____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to