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/hdl-tst-demo/main.rkt

13 lines
474 B
Racket

#lang br
(module reader br
8 years ago
(require "parser.rkt" "tokenizer.rkt")
(provide read-syntax)
(define (read-syntax source-path port)
8 years ago
(define-values (line col pos) (port-next-location port))
(define port+newline (input-port-append #f port (open-input-string "\n")))
(port-count-lines! port+newline)
(set-port-next-location! port+newline line col pos)
8 years ago
#`(module hdl-mod hdl-tst-demo/expander
8 years ago
#,(parse source-path (make-tokenizer port+newline)))))