adjustments

pull/10/head
Matthew Butterick 8 years ago
parent 04b52e473e
commit dccdc4ae1d

@ -1,5 +1,5 @@
#lang br/quicklang
(require "struct.rkt" "run.rkt" "elements.rkt" "runtime.rkt")
(require "struct.rkt" "run.rkt" "elements.rkt" "setup.rkt")
(provide (rename-out [b-module-begin #%module-begin])
(all-from-out "elements.rkt"))
@ -17,16 +17,17 @@
(list (suffix-id #'arg idx #:context caller-stx) val))])
#'(#%module-begin
(module configure-runtime br
(require basic-demo-3/runtime)
(configure-this!))
(require basic-demo-3/setup)
(do-setup!))
(require IMPORT-NAME) ...
(define VAR-ID 0) ...
(provide EXPORT-NAME ...)
(define VAR-ID 0) ...
(set! SHELL-ID SHELL-VAL) ...
LINE ...
(define line-table
(apply hasheqv (append (list NUM LINE-FUNC) ...)))
(parameterize ([current-output-port (basic-output-port)])
(parameterize
([current-output-port (basic-output-port)])
(void (run line-table))))))
(begin-for-syntax

@ -14,9 +14,9 @@
[num (string->number (string-trim str))])
(or num str))))
(define-macro (b-import IMPORT-NAME) #'(void))
(define-macro (b-import NAME) #'(void))
(define-macro (b-export EXPORT-NAME) #'(void))
(define-macro (b-export NAME) #'(void))
(define-macro (b-repl . ARGS)
(with-pattern ([STMTS (pattern-case-filter #'ARGS

@ -1,21 +0,0 @@
#lang br
(require "parser.rkt" "tokenizer.rkt")
(provide basic-output-port configure-this!)
(define basic-output-port
(make-parameter (open-output-nowhere)))
(define repl-parser (make-rule-parser b-repl))
(define (configure-this!)
(basic-output-port (current-output-port))
(define (read-one-line path port)
(define one-line (read-line port))
(if (eof-object? one-line)
eof
(repl-parser
(make-tokenizer (open-input-string one-line)))))
(current-read-interaction read-one-line))

@ -0,0 +1,21 @@
#lang br
(require "parser.rkt" "tokenizer.rkt")
(provide basic-output-port do-setup!)
(define basic-output-port
(make-parameter (open-output-nowhere)))
(define (do-setup!)
(basic-output-port (current-output-port))
(current-read-interaction read-one-line))
(define repl-parser (make-rule-parser b-repl))
(define (read-one-line path port)
(define one-line (read-line port))
(if (eof-object? one-line)
eof
(repl-parser
(make-tokenizer (open-input-string one-line)))))
Loading…
Cancel
Save