scan-new-word ( -- word )
Factor documentation > Factor handbook > The language > Parsing words > Defining words
Prev:scan-new ( -- word )
Next::


Vocabulary
parser

Inputs and outputs
worda word


Word description
Reads the next token from the parser input, and creates a word with that name in the current vocabulary and resets the generic word properties of that word.

Errors
Throws an error if the end of the file is reached.

Notes
This word should only be called from parsing words.

Definition
USING: kernel words ;

IN: parser

: scan-new-word ( -- word ) scan-new dup reset-generic ;