take-quoted-string ( sequence-parser escape-char quote-char -- string )


Vocabulary
c.lexer

Inputs
sequence-parseran object
escape-charan object
quote-charan object


Outputs
stringan object


Definition


:: take-quoted-string
( sequence-parser escape-char quote-char -- string )
sequence-parser n>> :> start-n sequence-parser advance [
{
[
{
[ previous escape-char = ]
[ current quote-char = ]
} 1&&
]
[ current quote-char = not ]
} 1||
] take-while :> string sequence-parser current quote-char =
[ sequence-parser advance drop string ]
[ start-n sequence-parser n<< f ] if ;