Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
SINGLETONS:
Factor documentation
>
Factor handbook
>
The language
>
Objects
>
Classes
>
Singleton classes
Prev:
SINGLETON:
Next:
define-singleton-class ( word -- )
Vocabulary
syntax
Syntax
SINGLETONS: words... ;
Inputs and outputs
words
a sequence of new words to define
Word description
Creates a new singleton for every token until the
;
.
Definition
USING:
classes.parser
classes.singleton
lexer
;
IN:
syntax
SYNTAX:
SINGLETONS:
";"
[
create-class-in
define-singleton-class
]
each-token
;