]> gitweb.factorcode.org Git - factor.git/commitdiff
tools.scaffold: remove unused contains-dot?, contains-separator?.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 22 Jan 2018 19:37:24 +0000 (11:37 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 22 Jan 2018 19:37:24 +0000 (11:37 -0800)
basis/tools/scaffold/scaffold.factor

index 003c90e14cfcfde3f5ecafcfb1a01d91ff20ed2d..762dcd6d25c5cdaca41a686b789c2c0f0ff2d1f0 100644 (file)
@@ -17,12 +17,7 @@ ERROR: not-a-vocab-root string ;
 <PRIVATE
 
 : vocab-root? ( string -- ? )
-    trim-tail-separators
-    vocab-roots get member? ;
-
-: contains-dot? ( string -- ? ) ".." swap subseq? ;
-
-: contains-separator? ( string -- ? ) [ path-separator? ] any? ;
+    trim-tail-separators vocab-roots get member? ;
 
 : ensure-vocab-exists ( string -- string )
     dup loaded-vocab-names member? [ no-vocab ] unless ;
@@ -41,8 +36,7 @@ ERROR: not-a-vocab-root string ;
     [ ] [ replace-vocab-separators ] bi* append-path ;
 
 : vocab>path ( vocab -- path )
-    check-vocab
-    [ find-vocab-root ] keep vocab-root/vocab>path ;
+    check-vocab [ find-vocab-root ] keep vocab-root/vocab>path ;
 
 : vocab-root/vocab/file>path ( vocab-root vocab file -- path )
     [ vocab-root/vocab>path ] dip append-path ;
@@ -147,12 +141,9 @@ M: string add-using drop ;
 M: object add-using ( object -- )
     vocabulary>> using get [ adjoin ] [ drop ] if* ;
 
-: 4bl ( -- )
-    "    " write ; inline
-
 : ($values.) ( array -- )
     [
-        4bl
+        "    " write
         [ bl ] [
             "{ " write
             dup array? [ first ] when
@@ -186,16 +177,13 @@ M: object add-using ( object -- )
     ] when* ;
 
 : class-description. ( word -- )
-    drop
-    "{ $class-description \"\" } ;" print ;
+    drop "{ $class-description \"\" } ;" print ;
 
 : symbol-description. ( word -- )
-    drop
-    "{ $var-description \"\" } ;" print ;
+    drop "{ $var-description \"\" } ;" print ;
 
 : $description. ( word -- )
-    drop
-    "{ $description \"\" } ;" print ;
+    drop "{ $description \"\" } ;" print ;
 
 : docs-body. ( word/symbol -- )
     {