mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-14 00:07:36 +02:00
Vector parsing
This commit is contained in:
parent
93798144b2
commit
87a83f43e4
1 changed files with 20 additions and 3 deletions
23
read.scm
23
read.scm
|
@ -743,9 +743,26 @@
|
|||
(reverse lis))
|
||||
(else
|
||||
(loop (cons t lis) (parse2 fp))))))
|
||||
((eq? token #())
|
||||
;; TODO: vector parsing, similar to list
|
||||
'TODO)
|
||||
((vector? token)
|
||||
(let loop ((lis '())
|
||||
(t (parse2 fp)))
|
||||
(cond
|
||||
((eof-object? t)
|
||||
(error "missing closing parenthesis"))
|
||||
((eq? t #\))
|
||||
(list->vector (reverse lis)))
|
||||
(else
|
||||
(loop (cons t lis) (parse2 fp))))))
|
||||
;;((bytevector? token)
|
||||
;; (let loop ((lis '())
|
||||
;; (t (parse2 fp)))
|
||||
;; (cond
|
||||
;; ((eof-object? t)
|
||||
;; (error "missing closing parenthesis"))
|
||||
;; ((eq? t #\))
|
||||
;; (list->vector (reverse lis)))
|
||||
;; (else
|
||||
;; (loop (cons t lis) (parse2 fp))))))
|
||||
((eq? token #\')
|
||||
(list 'quote (parse2 fp)))
|
||||
((eq? token #\`)
|
||||
|
|
Loading…
Add table
Reference in a new issue