pull/21/head
Matthew Butterick 6 years ago
parent 6024945967
commit 02a4d9a50e

@ -7,7 +7,7 @@
(for/list ([tok (in-port read ip)]) (for/list ([tok (in-port read ip)])
tok)) tok))
(define (parse toks) (define (parse src toks)
(for/list ([tok (in-list toks)]) (for/list ([tok (in-list toks)])
(integer->char (integer->char
(for/sum ([val (in-list tok)] (for/sum ([val (in-list tok)]
@ -17,7 +17,7 @@
(define (read-syntax src ip) (define (read-syntax src ip)
(define toks (tokenize ip)) (define toks (tokenize ip))
(define parse-tree (parse toks)) (define parse-tree (parse src toks))
(strip-context (strip-context
(with-syntax ([PT parse-tree]) (with-syntax ([PT parse-tree])
#'(module untaco racket #'(module untaco racket

@ -7,7 +7,7 @@
(for/list ([tok (in-port read ip)]) (for/list ([tok (in-port read ip)])
tok)) tok))
(define (parse toks) (define (parse src toks)
(for/list ([tok (in-list toks)]) (for/list ([tok (in-list toks)])
(integer->char (integer->char
(for/sum ([val (in-list tok)] (for/sum ([val (in-list tok)]
@ -17,7 +17,7 @@
(define (read-syntax src ip) (define (read-syntax src ip)
(define toks (tokenize ip)) (define toks (tokenize ip))
(define parse-tree (parse toks)) (define parse-tree (parse src toks))
(define src-string (list->string parse-tree)) (define src-string (list->string parse-tree))
(define racket-toks (define racket-toks
(for/list ([tok (in-port read (open-input-string src-string))]) (for/list ([tok (in-port read (open-input-string src-string))])

@ -17,7 +17,7 @@
(for/list ([tok (in-slice 7 toklets)]) (for/list ([tok (in-slice 7 toklets)])
tok)) tok))
(define (parse toks) (define (parse src toks)
(for/list ([tok (in-list toks)]) (for/list ([tok (in-list toks)])
(integer->char (integer->char
(for/sum ([val (in-list tok)] (for/sum ([val (in-list tok)]
@ -27,7 +27,7 @@
(define (read-syntax src ip) (define (read-syntax src ip)
(define toks (tokenize ip)) (define toks (tokenize ip))
(define parse-tree (parse toks)) (define parse-tree (parse src toks))
(strip-context (strip-context
(with-syntax ([PT parse-tree]) (with-syntax ([PT parse-tree])
#'(module untaco racket #'(module untaco racket

Loading…
Cancel
Save