MAIN:
Factor documentation > Factor handbook > The language > Vocabulary loader
Prev:reload ( name -- )
Next:run ( vocab -- )


Vocabulary
syntax

Syntax
MAIN: word


Inputs and outputs
worda word


Word description
Defines the main entry point for the current vocabulary and source file. This word will be executed when this vocabulary is passed to run or the source file is passed to run-script.

Definition
USING: accessors kernel namespaces parser source-files
vocabs.parser ;

IN: syntax

SYNTAX: MAIN:
scan-word
[ current-vocab main<< ]
[ file get [ main<< ] [ drop ] if* ] bi ;