language.funktors: initial stab at replacing FUNCTOR:
parent
3199c23f17
commit
70222b73e6
|
@ -0,0 +1,20 @@
|
|||
USING: accessors effects.parser eval grouping interpolate kernel
|
||||
multiline namespaces parser sequences sets splitting
|
||||
vocabs.parser words ;
|
||||
in: funktors
|
||||
|
||||
SYNTAX: \ factor[[ "]]" parse-multiline-string
|
||||
manifest get search-vocab-names>>
|
||||
{ "syntax" } diff members
|
||||
current-vocab name>> ".private" ?tail drop ".private" append suffix
|
||||
'[
|
||||
_ interpolate>string
|
||||
current-vocab name>> "\nIN: " "\n" surround prepend
|
||||
_ 5 group [ " " join ] map "\n" join
|
||||
"USING: " " ;\n" surround prepend
|
||||
eval( -- )
|
||||
] suffix! ;
|
||||
|
||||
SYNTAX: \ FUNKTOR:
|
||||
scan-new-escaped scan-effect scan-object
|
||||
'[ _ call ] swap define-declared ;
|
Loading…
Reference in New Issue