Handbook
Glossary
define-annotation ( NAME -- )
Vocabulary
annotations
Inputs
NAME
an
object
Outputs
None
Definition
USING:
functors.backend
functors.private
io
io.streams.string
kernel
parser
present
sequences
tools.crossref
words
;
IN:
annotations
::
define-annotation
( NAME -- )
[
"("
write
NAME
present
write
")"
write
]
with-string-writer
create-word-in
:>
(NAME)
[
"!"
write
NAME
present
write
]
with-string-writer
create-word-in
:>
!NAME
[
NAME
present
write
"s"
write
]
with-string-writer
create-word-in
:>
NAMEs
[
NAME
present
write
"s."
write
]
with-string-writer
create-word-in
:>
NAMEs. (NAME)
T{
fake-quotation
{
seq
{
drop
}
}
}
fake-quotations>
first
( str -- )
define-declared*
last-word
make-inline
!NAME
T{
fake-quotation
{
seq
{
(parse-annotation)
\
(NAME)
suffix!
}
}
}
fake-quotations>
first
define-syntax
NAMEs
T{
fake-quotation
{
seq
{
\
(NAME)
(non-annotation-usage)
}
}
}
fake-quotations>
first
( -- usages )
define-declared*
NAMEs.
T{
fake-quotation
{
seq
{
NAMEs
sorted-definitions.
}
}
}
fake-quotations>
first
( -- )
define-declared*
;