zybino/old-code/parse-only.rkt
2020-06-09 14:50:42 +12:00

18 lines
431 B
Racket

#lang br/quicklang
(require "parser.rkt" "tokenizer.rkt")
(define (read-syntax path port)
(define parse-tree (parse path (make-tokenizer port path)))
(strip-bindings
#`(module zybino-parser-mod zybino/parse-only
#,parse-tree)))
(module+ reader
(provide read-syntax))
(define-macro (parse-only-mb PARSE-TREE)
#'(#%module-begin
'PARSE-TREE))
(provide (rename-out [parse-only-mb #%module-begin]))