No subject

From: ()
Date: Sat Mar 24 01:50:51 EDT 2012

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


Posted on the users mailing list.