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/br/demo/jsonic-2/reader.rkt

12 lines
451 B
Racket

#lang br/quicklang
(require "tokenizer.rkt" "parser.rkt")
(define (syntax-no-bindings? stx)
(and (syntax? stx)
(equal? stx (strip-bindings stx))))
(define/contract (read-syntax path port)
(path? input-port? . -> . syntax?)
(define parse-tree (parse path (tokenize port)))
(define module-datum `(module jsonic-module br/demo/jsonic/expander
,parse-tree))
(datum->syntax #f module-datum))
(provide read-syntax)