Opened 5 years ago

Closed 4 years ago

#1332 closed defect (fixed)

keywords have no read/write invariance

Reported by: sjamaan Owned by:
Priority: major Milestone: 4.12.0
Component: core libraries Version: 4.11.0
Keywords: Cc:
Estimated difficulty: easy

Description

$ csi
#;1> (string->keyword "foo bar") ; Should be escaped
foo bar:
#;2> |foo bar|:                  ; Handled correctly by the reader
foo bar:
#;3> #:|foo bar|                 ; I don't know *what* is going on here!
|foo:

And

$ csi -K prefix
#;1> (string->keyword "foo bar")  ; should be escaped
:foo bar
#;2> :|foo bar|                   ; Handled correctly by the reader
:foo bar

I expect a keyword with a space in it to be serialised like the symbol and followed by a colon (or preceded, depending on the keyword style). The reader should handle the {{#:}}} prefix no different from the mode-specific syntax.

Change History (2)

comment:1 Changed 5 years ago by sjamaan

It turns out that #:|foo bar| is read by the simple tokenizer, instead of the extended symbol tokenizer that deals with pipe escapes.

comment:2 Changed 4 years ago by evhan

Resolution: fixed
Status: newclosed

Fixed by 1ab62dd3 (master) and de934e90, 3e3ccd8d (chicken-5).

Note: See TracTickets for help on using tickets.