lex-html ( stack n string -- stack n' string )


Vocabulary
modern.html

Inputs
stackan object
nan object
stringan object


Outputs
stackan object
n'an object
stringan object


Definition


: lex-html ( stack n string -- stack n' string )
"<" slice-til-either {
{
60
[
1 split-slice-back
[ >string f like [ reach push ] when* ] dip
[ 2dup peek1-from ] dip swap {
{ 47 ~quotation~ }
{ 33 ~quotation~ }
{ 63 ~quotation~ }
{ 37 ~quotation~ }
[ drop read-open-tag ]
} case
]
}
{ f [ drop f ] }
[ drop >string <text> ]
} case [ reach push lex-html ] when* ;