..
original commit: 30b1e8cb2f4ccdaf87080899798b529fc6085868
This commit is contained in:
parent
23122edff3
commit
2743a31f3c
|
@ -30,7 +30,7 @@ needed to really make this work:
|
||||||
(define syntax-snipclass%
|
(define syntax-snipclass%
|
||||||
(class snip-class%
|
(class snip-class%
|
||||||
(define/override (read stream)
|
(define/override (read stream)
|
||||||
(let ([str (send stream get-str)])
|
(let ([str (send stream get-string)])
|
||||||
(make-object syntax-snip% (unmarshall-syntax (read-from-string str)))))
|
(make-object syntax-snip% (unmarshall-syntax (read-from-string str)))))
|
||||||
(super-instantiate ())))
|
(super-instantiate ())))
|
||||||
|
|
||||||
|
@ -101,10 +101,12 @@ needed to really make this work:
|
||||||
(piece-of-info "Column" (syntax-column stx))
|
(piece-of-info "Column" (syntax-column stx))
|
||||||
(piece-of-info "Span" (syntax-span stx))
|
(piece-of-info "Span" (syntax-span stx))
|
||||||
(piece-of-info "Original?" (syntax-original? stx))
|
(piece-of-info "Original?" (syntax-original? stx))
|
||||||
(insert/big "Properties\n")
|
(let ([properties (syntax-properties stx)])
|
||||||
(for-each
|
(unless (null? properties)
|
||||||
(lambda (prop) (show-property stx prop))
|
(insert/big "Properties\n")
|
||||||
(syntax-properties stx)))
|
(for-each
|
||||||
|
(lambda (prop) (show-property stx prop))
|
||||||
|
properties))))
|
||||||
|
|
||||||
(define (show-property stx prop)
|
(define (show-property stx prop)
|
||||||
(piece-of-info (format "'~a" prop) (syntax-property stx prop)))
|
(piece-of-info (format "'~a" prop) (syntax-property stx prop)))
|
||||||
|
@ -465,8 +467,8 @@ needed to really make this work:
|
||||||
(span ,(syntax-span stx))
|
(span ,(syntax-span stx))
|
||||||
(original? ,(syntax-original? stx))
|
(original? ,(syntax-original? stx))
|
||||||
(properties
|
(properties
|
||||||
,@(map (lambda (x) `(,x ,(syntax-property x 'bound-in-source)))
|
,@(map (lambda (x) `(,x ,(syntax-property stx x)))
|
||||||
(syntax-properties x)))
|
(syntax-properties stx)))
|
||||||
(contents
|
(contents
|
||||||
,(marshall-object (syntax-e stx)))))
|
,(marshall-object (syntax-e stx)))))
|
||||||
|
|
||||||
|
@ -478,7 +480,12 @@ needed to really make this work:
|
||||||
[(pair? obj)
|
[(pair? obj)
|
||||||
`(pair ,(cons (marshall-object (car obj))
|
`(pair ,(cons (marshall-object (car obj))
|
||||||
(marshall-object (cdr obj))))]
|
(marshall-object (cdr obj))))]
|
||||||
[else `(other ,obj)]))
|
[(or (symbol? obj)
|
||||||
|
(char? obj)
|
||||||
|
(string? obj)
|
||||||
|
(boolean? obj))
|
||||||
|
`(other ,obj)]
|
||||||
|
[else 'unknown-object]))
|
||||||
|
|
||||||
(define (unmarshall-syntax stx)
|
(define (unmarshall-syntax stx)
|
||||||
(match stx
|
(match stx
|
||||||
|
|
Loading…
Reference in New Issue
Block a user