Handbook
Glossary
unparse-ch ( ch -- )
Vocabulary
prettyprint
.
backend
Inputs
ch
a character
Outputs
None
Word description
Adds the character to the sequence being constructed (see
Making sequences with variables
). If the character can appear in a string literal, it is added directly, otherwise an escape code is added.
Definition
USING:
kernel
make
math
math.parser
;
IN:
prettyprint.backend
:
unparse-ch
( ch -- )
ch>ascii-escape
[
92
,
,
]
[
dup
32
<
[
dup
16
<
"\\x0"
"\\x"
?
%
>hex
%
]
[
,
]
if
]
if
;