]> gitweb.factorcode.org Git - factor-unmaintained.git/blob - sto/sto.factor
unmaintained: New home for misfit Factor vocabularies.
[factor-unmaintained.git] / sto / sto.factor
1
2 USING: kernel lexer parser words quotations compiler.units ;
3
4 IN: sto
5
6 ! Use 'sto' to bind a value on the stack to a word.
7 !
8 ! Example:
9 !
10 !   10 sto A
11
12 : sto
13   \ 1quotation parsed
14   scan
15     current-vocab create
16     dup set-word
17   literalize parsed
18   \ swap parsed
19   [ define ] parsed
20   \ with-compilation-unit parsed ;                              parsing