fix display when reader abbreviations disabled
original commit: 039abedc10ea08b421b7b1bbdc5e9c1181a2cd8a
This commit is contained in:
parent
086f4cd171
commit
241263b9aa
|
@ -53,11 +53,11 @@
|
||||||
;; - a hashtable mapping S-expressions to syntax objects
|
;; - a hashtable mapping S-expressions to syntax objects
|
||||||
;; - a hashtable mapping syntax objects to S-expressions
|
;; - a hashtable mapping syntax objects to S-expressions
|
||||||
;; Syntax objects which are eq? will map to same flat values
|
;; Syntax objects which are eq? will map to same flat values
|
||||||
(define (syntax->datum/tables stx partition limit suffixopt)
|
(define (syntax->datum/tables stx partition limit suffixopt abbrev?)
|
||||||
(table stx partition limit suffixopt))
|
(table stx partition limit suffixopt abbrev?))
|
||||||
|
|
||||||
;; table : syntax maybe-partition% maybe-num SuffixOption -> (values s-expr hashtable hashtable)
|
;; table : syntax maybe-partition% maybe-num SuffixOption boolean -> (values s-expr hashtable hashtable)
|
||||||
(define (table stx partition limit suffixopt)
|
(define (table stx partition limit suffixopt abbrev?)
|
||||||
(define (make-identifier-proxy id)
|
(define (make-identifier-proxy id)
|
||||||
(define sym (syntax-e id))
|
(define sym (syntax-e id))
|
||||||
(case suffixopt
|
(case suffixopt
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
(hash-set! flat=>stx lp-datum obj)
|
(hash-set! flat=>stx lp-datum obj)
|
||||||
(hash-set! stx=>flat obj lp-datum)
|
(hash-set! stx=>flat obj lp-datum)
|
||||||
lp-datum)]
|
lp-datum)]
|
||||||
[(and (syntax? obj) (check+convert-special-expression obj))
|
[(and (syntax? obj) abbrev? (check+convert-special-expression obj))
|
||||||
=> (lambda (newobj)
|
=> (lambda (newobj)
|
||||||
(when partition (send/i partition partition<%> get-partition obj))
|
(when partition (send/i partition partition<%> get-partition obj))
|
||||||
(let* ([inner (cadr newobj)]
|
(let* ([inner (cadr newobj)]
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
primary-partition colors suffix-option styles columns abbrev?)
|
primary-partition colors suffix-option styles columns abbrev?)
|
||||||
(define range-builder (new range-builder%))
|
(define range-builder (new range-builder%))
|
||||||
(define-values (datum ht:flat=>stx ht:stx=>flat)
|
(define-values (datum ht:flat=>stx ht:stx=>flat)
|
||||||
(syntax->datum/tables stx primary-partition colors suffix-option))
|
(syntax->datum/tables stx primary-partition colors suffix-option abbrev?))
|
||||||
(define identifier-list
|
(define identifier-list
|
||||||
(filter identifier? (hash-map ht:stx=>flat (lambda (k v) k))))
|
(filter identifier? (hash-map ht:stx=>flat (lambda (k v) k))))
|
||||||
(define (flat=>stx obj)
|
(define (flat=>stx obj)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user