diff --git a/basis/functors/functors.factor b/basis/functors/functors.factor index b3ebaa4749..39ce30c32d 100644 --- a/basis/functors/functors.factor +++ b/basis/functors/functors.factor @@ -46,7 +46,7 @@ M: object (fake-quotations>) , ; [ fake-quotations> first ] append! ; : parse-declared* ( accum -- accum ) - complete-effect + scan-effect [ parse-definition* ] dip suffix! ; @@ -84,7 +84,7 @@ FUNCTOR-SYNTAX: M: FUNCTOR-SYNTAX: C: scan-param suffix! scan-param suffix! - complete-effect + scan-effect [ [ [ boa ] curry ] append! ] dip suffix! \ define-declared* suffix! ; @@ -109,7 +109,7 @@ FUNCTOR-SYNTAX: INSTANCE: FUNCTOR-SYNTAX: GENERIC: scan-param suffix! - complete-effect suffix! + scan-effect suffix! \ define-simple-generic* suffix! ; FUNCTOR-SYNTAX: MACRO: diff --git a/basis/locals/parser/parser.factor b/basis/locals/parser/parser.factor index 4d4731048a..5548e95ae3 100644 --- a/basis/locals/parser/parser.factor +++ b/basis/locals/parser/parser.factor @@ -64,7 +64,7 @@ M: lambda-parser parse-quotation ( -- quotation ) H{ } clone (parse-lambda) ?rewrite-closures ; : parse-locals ( -- effect vars assoc ) - complete-effect + scan-effect dup in>> [ dup pair? [ first ] when ] map make-locals ; diff --git a/basis/roman/roman.factor b/basis/roman/roman.factor index be7c70431d..69e4cca4ec 100644 --- a/basis/roman/roman.factor +++ b/basis/roman/roman.factor @@ -59,7 +59,7 @@ PRIVATE> SYNTAX: ROMAN-OP: scan-word [ name>> "roman" prepend create-in ] keep 1quotation '[ _ binary-roman-op ] - complete-effect define-declared ; + scan-effect define-declared ; >> diff --git a/basis/tools/rename/authors.txt b/basis/tools/rename/authors.txt new file mode 100644 index 0000000000..7c1b2f2279 --- /dev/null +++ b/basis/tools/rename/authors.txt @@ -0,0 +1 @@ +Doug Coleman diff --git a/basis/tools/rename/rename.factor b/basis/tools/rename/rename.factor new file mode 100644 index 0000000000..52fa7f7aa6 --- /dev/null +++ b/basis/tools/rename/rename.factor @@ -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 ; diff --git a/basis/xml/syntax/syntax.factor b/basis/xml/syntax/syntax.factor index 0b880e259c..9780869c0e 100644 --- a/basis/xml/syntax/syntax.factor +++ b/basis/xml/syntax/syntax.factor @@ -28,7 +28,7 @@ M: no-tag summary PRIVATE> SYNTAX: TAGS: - scan-new-word complete-effect + scan-new-word scan-effect [ drop H{ } clone "xtable" set-word-prop ] [ define-tags ] 2bi ; diff --git a/core/effects/parser/parser.factor b/core/effects/parser/parser.factor index ae41689491..5b46cd516e 100644 --- a/core/effects/parser/parser.factor +++ b/core/effects/parser/parser.factor @@ -51,7 +51,7 @@ PRIVATE> [ "--" parse-effect-tokens ] dip parse-effect-tokens ; -: complete-effect ( -- effect ) +: scan-effect ( -- effect ) "(" expect ")" parse-effect ; : parse-call( ( accum word -- accum ) @@ -59,5 +59,5 @@ PRIVATE> : (:) ( -- word def effect ) scan-new-word - complete-effect + scan-effect parse-definition swap ; diff --git a/core/generic/parser/parser.factor b/core/generic/parser/parser.factor index 14b8529018..d12e3669c2 100644 --- a/core/generic/parser/parser.factor +++ b/core/generic/parser/parser.factor @@ -9,7 +9,7 @@ ERROR: not-in-a-method-error ; : scan-new-generic ( -- word ) scan-new dup reset-word ; : (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 dup set-word dup save-location ; diff --git a/extra/multi-methods/multi-methods.factor b/extra/multi-methods/multi-methods.factor index d46c30a17c..df32526a12 100644 --- a/extra/multi-methods/multi-methods.factor +++ b/extra/multi-methods/multi-methods.factor @@ -224,7 +224,7 @@ M: no-method error. ] if ; ! 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-definition [ 2 tail ] [ second ] [ first ] tri ; diff --git a/extra/pair-methods/pair-methods.factor b/extra/pair-methods/pair-methods.factor index 3971c3e1a2..2ebb110c24 100644 --- a/extra/pair-methods/pair-methods.factor +++ b/extra/pair-methods/pair-methods.factor @@ -37,7 +37,7 @@ ERROR: no-pair-method a b generic ; [ drop make-pair-generic ] 2tri ; : (PAIR-GENERIC:) ( -- ) - scan-new-generic complete-effect define-pair-generic ; + scan-new-generic scan-effect define-pair-generic ; SYNTAX: PAIR-GENERIC: (PAIR-GENERIC:) ;