zybino/old-code/parse-only.rkt

18 lines
431 B
Racket
Raw Normal View History

2020-06-08 22:50:42 -04:00
#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]))