]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/lint/vocabs/vocabs.factor
Update String Regex
[factor.git] / extra / lint / vocabs / vocabs.factor
index 358a353dd9bf9f57cbd091a83fca230dba7a2a44..8b692cc1c05b2586314238605aa7dd0b96340618 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2022 CapitalEx
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays assocs compiler.units continuations
-formatting hash-sets hashtables io io.encodings.utf8 io.files
+USING: accessors arrays assocs compiler.units formatting 
+hash-sets hashtables io io.encodings.utf8 io.files
 kernel namespaces regexp sequences sequences.deep sets sorting
 splitting unicode vocabs vocabs.loader ;
 FROM: namespaces => set ;
@@ -34,8 +34,8 @@ SYMBOL: old-dictionary
 : find-import-statements ( string -- seq )
     "USING: [^;]+ ;|USE: \\S+" <regexp> all-matching-subseqs ;
 
-: clean-up-source ( string -- string )
-    "\"(\\\"|[^\"]*|\n)\"|(R/ (\\\\/|[^/])*/)|\\\\\\s+(USE:|USING:)|POSTPONE:\\s+(USE:|USING:)|! ([^\n])*" <regexp> "" re-replace ;
+: clean-up-source ( string -- string ) 
+    "\"(\\\\\"|[^\"])*\"|R/ (\\\\/|[^/])*/|\\\\\\s+(USE:|USING:)|POSTPONE:\\s+(USE:|USING:)|! [^\n]*|CHAR:\\s+\\S+\\s+" <regexp> "" re-replace ;
 
 : strip-syntax ( seq -- seq )
     [ "USING: | ;|USE: " <regexp> " " re-replace ] map ;