]> gitweb.factorcode.org Git - factor.git/commitdiff
Separate regexp.prettyprint from regexp to reduce deployed image size
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Wed, 18 Mar 2009 22:07:19 +0000 (17:07 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Wed, 18 Mar 2009 22:07:19 +0000 (17:07 -0500)
basis/regexp/prettyprint/authors.txt [new file with mode: 0644]
basis/regexp/prettyprint/prettyprint.factor [new file with mode: 0644]
basis/regexp/regexp.factor

diff --git a/basis/regexp/prettyprint/authors.txt b/basis/regexp/prettyprint/authors.txt
new file mode 100644 (file)
index 0000000..d4f5d6b
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
\ No newline at end of file
diff --git a/basis/regexp/prettyprint/prettyprint.factor b/basis/regexp/prettyprint/prettyprint.factor
new file mode 100644 (file)
index 0000000..7af762a
--- /dev/null
@@ -0,0 +1,13 @@
+! Copyright (C) 2008, 2009 Doug Coleman, Daniel Ehrenberg.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors kernel make prettyprint.backend
+prettyprint.custom regexp regexp.parser regexp.private ;
+IN: regexp.prettyprint
+
+M: regexp pprint*
+    [
+        [
+            [ raw>> dup find-regexp-syntax swap % swap % % ]
+            [ options>> options>string % ] bi
+        ] "" make
+    ] keep present-text ;
\ No newline at end of file
index 5889b19e476d122b2212a87bbf1b5270e81c4667..33499b14372bc5e7a143cfda03d0afc6248f35fe 100644 (file)
@@ -1,10 +1,9 @@
 ! Copyright (C) 2008, 2009 Doug Coleman, Daniel Ehrenberg.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors combinators kernel kernel.private math sequences
-sequences.private strings sets assocs prettyprint.backend
-prettyprint.custom make lexer namespaces parser arrays fry locals
-regexp.parser splitting sorting regexp.ast regexp.negation
-regexp.compiler compiler.units words math.ranges ;
+sequences.private strings sets assocs make lexer namespaces parser
+arrays fry locals regexp.parser splitting sorting regexp.ast
+regexp.negation regexp.compiler compiler.units words math.ranges ;
 IN: regexp
 
 TUPLE: regexp
@@ -217,11 +216,8 @@ PRIVATE>
 : R{ CHAR: } parsing-regexp ; parsing
 : R| CHAR: | parsing-regexp ; parsing
 
-M: regexp pprint*
-    [
-        [
-            [ raw>> dup find-regexp-syntax swap % swap % % ]
-            [ options>> options>string % ] bi
-        ] "" make
-    ] keep present-text ;
+USING: vocabs vocabs.loader ;
 
+"prettyprint" vocab [
+    "regexp.prettyprint" require
+] when
\ No newline at end of file