Vocabulary
lexer

Inputs
enda string
quota quotation with stack effect ( ... token -- ... )


Outputs
None

Word description
Reads a sequence of tokens until the first occurrence of end. quot is called on each token as it is read.

Examples
This word is used to implement USING:.

Notes
This word should only be called from parsing words.

See also
parse-tokens, map-tokens, (parse-until), parse-until

Definition


: each-token ( ... end quot: ( ... token -- ... ) -- ... )
[ scan-token ] 2dip 2over =
[ 3drop ] [ [ nip call ] [ each-token ] 2bi ] if ; inline
recursive