]> gitweb.factorcode.org Git - factor.git/commitdiff
Use `vocabs.prettyprint.private`
authorCapitalEx <CapitalEx@protonmail.com>
Wed, 14 Dec 2022 19:20:07 +0000 (14:20 -0500)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 15 Dec 2022 00:07:20 +0000 (16:07 -0800)
extra/lint/vocabs/vocabs.factor

index 8c8d76b4cbaf0e86635efc29b7ff63fb093451c6..c82fcb35de19ad166f07c82624a66e9361c126de 100644 (file)
@@ -3,11 +3,10 @@
 USING: accessors arrays assocs combinators
 combinators.short-circuit compiler.units formatting hash-sets
 hashtables io io.encodings.utf8 io.files io.styles kernel
-namespaces prettyprint.backend prettyprint.sections sequences
-sequences.parser sets sorting strings unicode vectors vocabs
-vocabs.loader vocabs.prettyprint ;
+namespaces sequences sequences.parser sets sorting strings 
+unicode vectors vocabs vocabs.loader vocabs.prettyprint 
+vocabs.prettyprint.private ;
 FROM: namespaces => set ;
-FROM: sequences.parser => next advance ;
 IN: lint.vocabs
 
 <PRIVATE
@@ -205,16 +204,6 @@ DEFER: next-token
 : reject-unused-vocabs ( assoc hash-set -- seq )
     [is-used?] assoc-reject keys ;
 
-! Take this from vocabs.prettyprint.private so I'm not
-! depending on internal details of vocabs.prettyprint.
-: pprint-using ( seq -- )
-    "syntax" lookup-vocab '[ _ = ] reject
-    [ vocab-name ] sort-with [
-        \ USING: pprint-word
-        [ pprint-vocab ] each
-        \ ; pprint-word
-    ] with-pprint ;
-
 :: print-new-header ( seq -- )
     "Use the following header to remove unused imports: " print
     manifest-style [ cache get seq diff pprint-using ] with-nesting ;