scan-word ( -- word )
Factor handbook > The language > Parsing words > Reading ahead

Prev:scan-word-name ( -- string )
Next:scan-datum ( -- word/number )


Vocabulary
parser

Inputs and outputs
worda word


Word description
Reads the next token from parser input. If the token is a valid number literal, it is converted to a number, otherwise the vocabulary search path is searched for a word named by the token.

Errors
Throws an error if the token does not name a word or end of file is reached.

Notes
This word should only be called from parsing words.

See also
parse-word

Definition