simplify runtime config

pull/10/head
Matthew Butterick 8 years ago
parent 5cc0f73028
commit c1e2939aa6

@ -15,8 +15,7 @@
#'(#%module-begin
(module configure-runtime br
(require "runtime.rkt")
(current-basic-port (current-output-port))
(configure-repl!))
(configure-this!))
(require REQ-SPEC) ...
(define VAR-ID 0) ...
(provide VAR-ID ...)
@ -24,8 +23,7 @@
LINE ...
(define line-table
(apply hasheqv (append (list NUM LINE-FUNC) ...)))
(parameterize ([current-output-port
(or (current-basic-port) (open-output-nowhere))])
(parameterize ([current-output-port (basic-output-port)])
(void (run line-table))))))
(begin-for-syntax

@ -1,10 +1,12 @@
#lang br
(require "parser.rkt" "tokenizer.rkt")
(provide current-basic-port configure-repl!)
(provide basic-output-port configure-this!)
(define current-basic-port (make-parameter #f))
(define basic-output-port (make-parameter (open-output-nowhere)))
(define (configure-this!)
(basic-output-port (current-output-port))
(define (configure-repl!)
(define statement-parser (make-rule-parser b-statement))
(define (read-one-line path port)
(define one-line (read-line port))

Loading…
Cancel
Save