zybino/old-code/main.rkt

22 lines
566 B
Racket
Raw Permalink Normal View History

2020-06-08 22:50:42 -04:00
#lang racket/base
(require "parser.rkt" "tokenizer.rkt")
(require syntax/strip-context)
(module+ reader
(provide read-syntax get-info))
(define (read-syntax path port)
(define parse-tree (parse path (make-tokenizer port path)))
(strip-context
#`(module zybino-mod zybino/expander
#,parse-tree)))
(define (get-info port src-mod src-line src-col src-pos)
(define (handle-query key default)
(case key
[(colour-lexer)
(dynamic-require 'zybino/colourer 'zybino-colourer)]
[else default]))
handle-query)