Handbook
Glossary
parse-help-token ( end -- str/obj/f literal? )
Vocabulary
help
.
syntax
.
private
Inputs
end
an
object
Outputs
str/obj/f
an
object
literal?
an
object
Definition
USING:
accessors
arrays
combinators
combinators.short-circuit
help.markup
help.syntax
kernel
lexer
parser
sequences
vocabs.parser
words
;
IN:
help.syntax.private
::
parse-help-token
( end -- str/obj/f literal? )
?scan-token
dup
{
[
"{"
=
[
\
HELP{
]
[
f
]
if
]
[
"syntax"
lookup-word
]
[
{
[
"$"
head?
]
[
"help.markup"
lookup-word
]
}
1&&
]
[
dup
?last
":{[(/\""
member-eq?
[
search
]
[
drop
f
]
if
]
}
1||
{
{
[
dup
not
]
[
drop
f
]
}
{
[
dup
end
eq?
]
[
2drop
f
f
]
}
{
[
dup
parsing-word?
]
[
[
nip
V{
}
clone
swap
execute-parsing
first
dup
wrapper?
[
wrapped>>
\
$link
swap
2array
]
when
]
keep
\
"
=
]
}
{
[
dup
]
[
nip
f
]
}
}
cond
;