pull/10/head
Matthew Butterick 8 years ago
parent 10bd6435d4
commit a9b6cb6181

@ -18,12 +18,17 @@
(define-macro (b-export NAME) #'(void)) (define-macro (b-export NAME) #'(void))
(define-macro (b-repl . REPL-INPUTS) (define-macro (b-repl . ALL-INPUTS)
(with-pattern ([INPUTS (pattern-case-filter #'REPL-INPUTS (with-pattern
[(b-expr . EXPR-ARGS) ([INPUTS (pattern-case-filter #'ALL-INPUTS
#'(b-print (b-expr . EXPR-ARGS))]
[(b-print . PRINT-ARGS) [(b-print . PRINT-ARGS)
#'(b-print . PRINT-ARGS)] #'(b-print . PRINT-ARGS)]
[OTHER [(b-expr . EXPR-ARGS)
#'(b-print (b-expr . EXPR-ARGS))]
[(b-let ID VAL)
#'(define ID VAL)]
[(b-def FUNC-ID VAR-ID ... EXPR)
#'(define (FUNC-ID VAR-ID ...) EXPR)]
[ANYTHING-ELSE
#'(error 'invalid-repl-input)])]) #'(error 'invalid-repl-input)])])
#'(begin . INPUTS))) #'(begin . INPUTS)))
Loading…
Cancel
Save