Do not use CPT_ESCAPE for every CPT_QUOTE, instead if it was a protect-quote, then just put the CPT_QUOTE in.
This commit is contained in:
parent
599ffacd47
commit
53fdc09e7a
|
@ -778,9 +778,9 @@
|
||||||
out)]
|
out)]
|
||||||
[(struct let-one (rhs body flonum? unused?))
|
[(struct let-one (rhs body flonum? unused?))
|
||||||
(out-byte (cond
|
(out-byte (cond
|
||||||
[flonum? CPT_LET_ONE_FLONUM]
|
[flonum? CPT_LET_ONE_FLONUM]
|
||||||
[unused? CPT_LET_ONE_UNUSED]
|
[unused? CPT_LET_ONE_UNUSED]
|
||||||
[else CPT_LET_ONE])
|
[else CPT_LET_ONE])
|
||||||
out)
|
out)
|
||||||
(out-expr (protect-quote rhs) out)
|
(out-expr (protect-quote rhs) out)
|
||||||
(out-expr (protect-quote body) out)]
|
(out-expr (protect-quote body) out)]
|
||||||
|
@ -1078,14 +1078,14 @@
|
||||||
(out-wrapped expr out)]
|
(out-wrapped expr out)]
|
||||||
[else
|
[else
|
||||||
(out-byte CPT_QUOTE out)
|
(out-byte CPT_QUOTE out)
|
||||||
(let ([s (open-output-bytes)])
|
(if (quoted? expr)
|
||||||
(write (if (quoted? expr)
|
(out-data (quoted-v expr) out)
|
||||||
(quoted-v expr)
|
(let ([s (open-output-bytes)])
|
||||||
expr) s)
|
(write expr s)
|
||||||
(out-byte CPT_ESCAPE out)
|
(out-byte CPT_ESCAPE out)
|
||||||
(let ([bstr (get-output-bytes s)])
|
(let ([bstr (get-output-bytes s)])
|
||||||
(out-number (bytes-length bstr) out)
|
(out-number (bytes-length bstr) out)
|
||||||
(out-bytes bstr out)))]))
|
(out-bytes bstr out))))]))
|
||||||
|
|
||||||
|
|
||||||
(define-struct quoted (v) #:prefab)
|
(define-struct quoted (v) #:prefab)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user