mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-21 14:49:17 +02:00
Higher-level handler for parse2
This commit is contained in:
parent
94f15d699e
commit
4b7386dedf
1 changed files with 7 additions and 1 deletions
8
read.scm
8
read.scm
|
@ -702,7 +702,7 @@
|
|||
" return_closcall1(data, k, equalp( opaque_ptr(opq), obj ));")
|
||||
|
||||
(write
|
||||
(parse2 (open-input-file "test.scm")))
|
||||
(call-parse2 (open-input-file "test.scm")))
|
||||
;(read-token (open-input-file "test.scm")))
|
||||
|
||||
;TODO: getting there, but still not parsed correctly:
|
||||
|
@ -735,6 +735,12 @@
|
|||
|
||||
)))
|
||||
|
||||
(define (call-parse2 fp)
|
||||
(let ((result (parse2 fp)))
|
||||
(if (Cyc-opaque? result)
|
||||
(error "unexpected closing parenthesis")
|
||||
result)))
|
||||
|
||||
(define (parse2 fp)
|
||||
(let ((token (read-token fp))) ;; TODO: this will be a C call
|
||||
;(write `(token ,token))
|
||||
|
|
Loading…
Add table
Reference in a new issue