scan-number ( -- number )
Factor handbook » The language » Parsing words » Reading ahead

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


Vocabulary
parser

Inputs
None

Outputs
numbera number


Word description
Reads the next token from parser input. If the token is a number literal, it is converted to a number. Otherwise, it throws an error.

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

Notes
This word should only be called from parsing words.

Definition