]> gitweb.factorcode.org Git - factor.git/commitdiff
Rename complete-effect to scan-effect
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 17 Oct 2011 05:50:30 +0000 (22:50 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 17 Oct 2011 17:25:27 +0000 (10:25 -0700)
basis/functors/functors.factor
basis/locals/parser/parser.factor
basis/roman/roman.factor
basis/tools/rename/authors.txt [new file with mode: 0644]
basis/tools/rename/rename.factor [new file with mode: 0644]
basis/xml/syntax/syntax.factor
core/effects/parser/parser.factor
core/generic/parser/parser.factor
extra/multi-methods/multi-methods.factor
extra/pair-methods/pair-methods.factor

index b3ebaa4749f2c645b22e76f2d5eb046196693ac4..39ce30c32d9cfb42c5b311c74012f0e078f7c63d 100644 (file)
@@ -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:
index 4d4731048af5f0e71d32af25490f321fb1316a17..5548e95ae31cbe7d5abb89024b62cee18e93d8ea 100644 (file)
@@ -64,7 +64,7 @@ M: lambda-parser parse-quotation ( -- quotation )
     H{ } clone (parse-lambda) <let> ?rewrite-closures ;
 
 : parse-locals ( -- effect vars assoc )
-    complete-effect
+    scan-effect
     dup
     in>> [ dup pair? [ first ] when ] map make-locals ;
 
index be7c70431dae838603b99b8a24edc4f526f38af7..69e4cca4ec80d192b699315b49be79405a69348a 100644 (file)
@@ -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 (file)
index 0000000..7c1b2f2
--- /dev/null
@@ -0,0 +1 @@
+Doug Coleman
diff --git a/basis/tools/rename/rename.factor b/basis/tools/rename/rename.factor
new file mode 100644 (file)
index 0000000..52fa7f7
--- /dev/null
@@ -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 ;
index 0b880e259c663297d8aa2e845a1eb27d97f43261..9780869c0efddd321066c15aa829c44ef82fdb05 100644 (file)
@@ -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 ;
index ae4168949121b6183d8f9ccd66cb5fcc0c684547..5b46cd516e94b89d5a4766c808c735c328b2f53b 100644 (file)
@@ -51,7 +51,7 @@ PRIVATE>
     [ "--" parse-effect-tokens ] dip parse-effect-tokens
     <variable-effect> ;
 
-: 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 ;
index 14b85290182fc522cf533bc5fee4fd739dead4af..d12e3669c21f72fdf43e74480f06881bc501da3d 100644 (file)
@@ -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 ;
index d46c30a17cd75dd2f9b47fc881710e527ecd70f6..df32526a127016a4d6cc10b494cf2a1f5a118c0a 100644 (file)
@@ -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 ;
index 3971c3e1a2ae0442998859612547299134cdc9a0..2ebb110c24fec9ce015fb71072f7bc92710fd06a 100644 (file)
@@ -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:) ;