?scan-token ( -- str/f )
Factor handbook » The language » Parsing words » Reading ahead

Prev:scan-object ( -- object )
Next:?scan-datum ( -- word/number/f )


Vocabulary
lexer

Inputs
None

Outputs
str/fa string or f


Word description
Reads the next token from the lexer. Tokens are delimited by whitespace, with the exception that " is treated like a single token even when not followed by whitespace. This word outputs f on end of input. To throw an error on end of input, use scan-token instead.

Notes
This word should only be called from parsing words.

Definition