mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 04:25:06 +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
|
||||||
read-all
|
read-all
|
||||||
read-all/source
|
read-all/source
|
||||||
|
*source-loc-lis*
|
||||||
include
|
include
|
||||||
include-ci)
|
include-ci)
|
||||||
(inline
|
(inline
|
||||||
|
@ -26,6 +27,7 @@
|
||||||
(define *sym-dot* (string->symbol "."))
|
(define *sym-dot* (string->symbol "."))
|
||||||
(define *sym-unquote-splicing* (string->symbol ",@"))
|
(define *sym-unquote-splicing* (string->symbol ",@"))
|
||||||
(define *sym-datum-comment* (string->symbol "#;"))
|
(define *sym-datum-comment* (string->symbol "#;"))
|
||||||
|
(define *source-loc-lis* '())
|
||||||
|
|
||||||
(define-syntax include
|
(define-syntax include
|
||||||
(er-macro-transformer
|
(er-macro-transformer
|
||||||
|
@ -166,10 +168,13 @@
|
||||||
return_closcall1(data, k, obj_int2obj(num)); ")
|
return_closcall1(data, k, obj_int2obj(num)); ")
|
||||||
|
|
||||||
(define (store-source-info! obj filename line col)
|
(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
|
;; 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,
|
;; be accessible from macro's. probably needs to be in global env,
|
||||||
;; see (cyclone foreign) for an example
|
;; see (cyclone foreign) for an example
|
||||||
'todo)
|
|
||||||
;; TODO: need corresponding macro (syntax-error/source ??) to use this
|
;; TODO: need corresponding macro (syntax-error/source ??) to use this
|
||||||
;; information for error reporting
|
;; information for error reporting
|
||||||
;; TODO: probably want to have a top-level exception handler on macro
|
;; TODO: probably want to have a top-level exception handler on macro
|
||||||
|
|
Loading…
Add table
Reference in a new issue