Rename complete-effect to scan-effect
parent
54e075c76c
commit
f21fee3b73
|
@ -46,7 +46,7 @@ M: object (fake-quotations>) , ;
|
||||||
[ fake-quotations> first ] append! ;
|
[ fake-quotations> first ] append! ;
|
||||||
|
|
||||||
: parse-declared* ( accum -- accum )
|
: parse-declared* ( accum -- accum )
|
||||||
complete-effect
|
scan-effect
|
||||||
[ parse-definition* ] dip
|
[ parse-definition* ] dip
|
||||||
suffix! ;
|
suffix! ;
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ FUNCTOR-SYNTAX: M:
|
||||||
FUNCTOR-SYNTAX: C:
|
FUNCTOR-SYNTAX: C:
|
||||||
scan-param suffix!
|
scan-param suffix!
|
||||||
scan-param suffix!
|
scan-param suffix!
|
||||||
complete-effect
|
scan-effect
|
||||||
[ [ [ boa ] curry ] append! ] dip suffix!
|
[ [ [ boa ] curry ] append! ] dip suffix!
|
||||||
\ define-declared* suffix! ;
|
\ define-declared* suffix! ;
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ FUNCTOR-SYNTAX: INSTANCE:
|
||||||
|
|
||||||
FUNCTOR-SYNTAX: GENERIC:
|
FUNCTOR-SYNTAX: GENERIC:
|
||||||
scan-param suffix!
|
scan-param suffix!
|
||||||
complete-effect suffix!
|
scan-effect suffix!
|
||||||
\ define-simple-generic* suffix! ;
|
\ define-simple-generic* suffix! ;
|
||||||
|
|
||||||
FUNCTOR-SYNTAX: MACRO:
|
FUNCTOR-SYNTAX: MACRO:
|
||||||
|
|
|
@ -64,7 +64,7 @@ M: lambda-parser parse-quotation ( -- quotation )
|
||||||
H{ } clone (parse-lambda) <let> ?rewrite-closures ;
|
H{ } clone (parse-lambda) <let> ?rewrite-closures ;
|
||||||
|
|
||||||
: parse-locals ( -- effect vars assoc )
|
: parse-locals ( -- effect vars assoc )
|
||||||
complete-effect
|
scan-effect
|
||||||
dup
|
dup
|
||||||
in>> [ dup pair? [ first ] when ] map make-locals ;
|
in>> [ dup pair? [ first ] when ] map make-locals ;
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ PRIVATE>
|
||||||
SYNTAX: ROMAN-OP:
|
SYNTAX: ROMAN-OP:
|
||||||
scan-word [ name>> "roman" prepend create-in ] keep
|
scan-word [ name>> "roman" prepend create-in ] keep
|
||||||
1quotation '[ _ binary-roman-op ]
|
1quotation '[ _ binary-roman-op ]
|
||||||
complete-effect define-declared ;
|
scan-effect define-declared ;
|
||||||
|
|
||||||
>>
|
>>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Doug Coleman
|
|
@ -0,0 +1,18 @@
|
||||||
|
! Copyright (C) 2011 Doug Coleman.
|
||||||
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
|
USING: combinators.short-circuit io.directories.search io.files
|
||||||
|
io.files.info io.pathnames kernel sequences ;
|
||||||
|
IN: tools.rename
|
||||||
|
|
||||||
|
ERROR: directory-contains-files-error path ;
|
||||||
|
|
||||||
|
: directory-contains-files? ( path -- ? )
|
||||||
|
qualified-directory-files [ link-info directory? ] all? not ;
|
||||||
|
|
||||||
|
: check-new-vocab-path ( old new -- old new )
|
||||||
|
2dup [ vocab-path parent-directory ] dip append-path
|
||||||
|
{ [ exists? ] [ directory-contains-files? ] } 1&&
|
||||||
|
[ directory-contains-files-error ] unless ;
|
||||||
|
|
||||||
|
: rename-vocab ( old new -- )
|
||||||
|
check-new-vocab-path 2drop ;
|
|
@ -28,7 +28,7 @@ M: no-tag summary
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
SYNTAX: TAGS:
|
SYNTAX: TAGS:
|
||||||
scan-new-word complete-effect
|
scan-new-word scan-effect
|
||||||
[ drop H{ } clone "xtable" set-word-prop ]
|
[ drop H{ } clone "xtable" set-word-prop ]
|
||||||
[ define-tags ]
|
[ define-tags ]
|
||||||
2bi ;
|
2bi ;
|
||||||
|
|
|
@ -51,7 +51,7 @@ PRIVATE>
|
||||||
[ "--" parse-effect-tokens ] dip parse-effect-tokens
|
[ "--" parse-effect-tokens ] dip parse-effect-tokens
|
||||||
<variable-effect> ;
|
<variable-effect> ;
|
||||||
|
|
||||||
: complete-effect ( -- effect )
|
: scan-effect ( -- effect )
|
||||||
"(" expect ")" parse-effect ;
|
"(" expect ")" parse-effect ;
|
||||||
|
|
||||||
: parse-call( ( accum word -- accum )
|
: parse-call( ( accum word -- accum )
|
||||||
|
@ -59,5 +59,5 @@ PRIVATE>
|
||||||
|
|
||||||
: (:) ( -- word def effect )
|
: (:) ( -- word def effect )
|
||||||
scan-new-word
|
scan-new-word
|
||||||
complete-effect
|
scan-effect
|
||||||
parse-definition swap ;
|
parse-definition swap ;
|
||||||
|
|
|
@ -9,7 +9,7 @@ ERROR: not-in-a-method-error ;
|
||||||
: scan-new-generic ( -- word ) scan-new dup reset-word ;
|
: scan-new-generic ( -- word ) scan-new dup reset-word ;
|
||||||
|
|
||||||
: (GENERIC:) ( quot -- )
|
: (GENERIC:) ( quot -- )
|
||||||
[ scan-new-generic ] dip call complete-effect define-generic ; inline
|
[ scan-new-generic ] dip call scan-effect define-generic ; inline
|
||||||
|
|
||||||
: create-method-in ( class generic -- method )
|
: create-method-in ( class generic -- method )
|
||||||
create-method dup set-word dup save-location ;
|
create-method dup set-word dup save-location ;
|
||||||
|
|
|
@ -224,7 +224,7 @@ M: no-method error.
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
! Syntax
|
! Syntax
|
||||||
SYNTAX: GENERIC: scan-new-word complete-effect define-generic ;
|
SYNTAX: GENERIC: scan-new-word scan-effect define-generic ;
|
||||||
|
|
||||||
: parse-method ( -- quot classes generic )
|
: parse-method ( -- quot classes generic )
|
||||||
parse-definition [ 2 tail ] [ second ] [ first ] tri ;
|
parse-definition [ 2 tail ] [ second ] [ first ] tri ;
|
||||||
|
|
|
@ -37,7 +37,7 @@ ERROR: no-pair-method a b generic ;
|
||||||
[ drop make-pair-generic ] 2tri ;
|
[ drop make-pair-generic ] 2tri ;
|
||||||
|
|
||||||
: (PAIR-GENERIC:) ( -- )
|
: (PAIR-GENERIC:) ( -- )
|
||||||
scan-new-generic complete-effect define-pair-generic ;
|
scan-new-generic scan-effect define-pair-generic ;
|
||||||
|
|
||||||
SYNTAX: PAIR-GENERIC: (PAIR-GENERIC:) ;
|
SYNTAX: PAIR-GENERIC: (PAIR-GENERIC:) ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue