Handbook
Glossary
(named-character-reference-state) ( document n/f string ch/f -- document n'/f string )
Vocabulary
html5
Inputs
document
an
object
n/f
an
object
string
an
object
ch/f
an
object
Outputs
document
an
object
n'/f
an
object
string
an
object
Definition
USING:
accessors
combinators.short-circuit
kernel
modern.slices
sequences
;
IN:
html5
:
(named-character-reference-state)
( document n/f string ch/f -- document n'/f string )
reach
push-temporary-buffer
pick
named-character-match?
[
drop
{
[
pick
temporary-buffer-attribute?
]
[
pick
temporary-buffer>>
?last
59
=
not
]
[
3dup
peek-from
{
[
61
=
]
[
ascii-alphanumeric?
]
}
1||
]
}
0&&
[
unimplemented*
flush-temporary-buffer
return-state
]
[
pick
[
take-named-character
]
[
flush-temporary-buffer
]
bi
return-state
]
if
]
[
[
named-character-reference-state
]
[
pick
flush-temporary-buffer
ambiguous-ampersand-state
]
if
]
if
;