You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
beautiful-racket/beautiful-racket-demo/basic-demo-3/main.rkt

19 lines
517 B
Racket

8 years ago
#lang br/quicklang
(require "parser.rkt" "tokenizer.rkt")
(module+ reader
(provide read-syntax get-info))
(define (read-syntax path port)
(define parse-tree (parse path (make-tokenizer port path)))
(strip-bindings
8 years ago
#`(module basic-mod basic-demo-3/expander
8 years ago
#,parse-tree)))
(define (get-info port mod line col pos)
(define (handle-query key default)
(case key
[(color-lexer)
8 years ago
(dynamic-require 'basic-demo-3/colorer 'basic-colorer)]
8 years ago
[else default]))
handle-query)