mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Added code to test location storage
This commit is contained in:
parent
a4421267e4
commit
cb08f60ec2
1 changed files with 6 additions and 1 deletions
|
@ -14,6 +14,7 @@
|
|||
read
|
||||
read-all
|
||||
read-all/source
|
||||
*source-loc-lis*
|
||||
include
|
||||
include-ci)
|
||||
(inline
|
||||
|
@ -26,6 +27,7 @@
|
|||
(define *sym-dot* (string->symbol "."))
|
||||
(define *sym-unquote-splicing* (string->symbol ",@"))
|
||||
(define *sym-datum-comment* (string->symbol "#;"))
|
||||
(define *source-loc-lis* '())
|
||||
|
||||
(define-syntax include
|
||||
(er-macro-transformer
|
||||
|
@ -166,10 +168,13 @@
|
|||
return_closcall1(data, k, obj_int2obj(num)); ")
|
||||
|
||||
(define (store-source-info! obj filename line col)
|
||||
(set! *source-loc-lis*
|
||||
;; TODO: not good enough, need to index by file and obj
|
||||
(cons (cons obj (vector filename line col))
|
||||
*source-loc-lis*)))
|
||||
;; TODO: where to store? Need to use a hashtable but also needs to
|
||||
;; be accessible from macro's. probably needs to be in global env,
|
||||
;; see (cyclone foreign) for an example
|
||||
'todo)
|
||||
;; TODO: need corresponding macro (syntax-error/source ??) to use this
|
||||
;; information for error reporting
|
||||
;; TODO: probably want to have a top-level exception handler on macro
|
||||
|
|
Loading…
Add table
Reference in a new issue