]> gitweb.factorcode.org Git - factor.git/commitdiff
alien.debugger: this vocab isn't needed
authorBjörn Lindqvist <bjourne@gmail.com>
Sat, 13 Aug 2016 13:49:33 +0000 (15:49 +0200)
committerBjörn Lindqvist <bjourne@gmail.com>
Mon, 15 Aug 2016 13:16:41 +0000 (15:16 +0200)
The summary methods doesn't need dedicated vocabs. Unlike prettyprint methods.

basis/alien/debugger/authors.txt [deleted file]
basis/alien/debugger/debugger.factor [deleted file]
basis/alien/parser/parser-tests.factor
basis/alien/parser/parser.factor
basis/bootstrap/compiler/compiler.factor

diff --git a/basis/alien/debugger/authors.txt b/basis/alien/debugger/authors.txt
deleted file mode 100644 (file)
index f13c9c1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Joe Groff
diff --git a/basis/alien/debugger/debugger.factor b/basis/alien/debugger/debugger.factor
deleted file mode 100644 (file)
index 24182da..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-! Copyright (C) 2010 Joe Groff.
-! See http://factorcode.org/license.txt for BSD license.
-USING: accessors alien.c-types alien.parser prettyprint
-sequences summary ;
-IN: alien.debugger
-
-M: no-c-type summary name>> unparse "“" "” is not a C type" surround ;
-
-M: *-in-c-type-name summary
-    name>> "Cannot define a C type “" "” that ends with an asterisk (*)" surround ;
index 2b10cc48f50c9ce04f2cf088eb94378398c8a163..fb1c76182f0c5926d463a2f6c0c6fd701b1fb257 100644 (file)
@@ -1,8 +1,8 @@
 ! (c)2009 Joe Groff bsd license
 USING: accessors alien.c-types alien.parser alien.parser.private
 alien.syntax compiler.units continuations debugger eval fry kernel
-lexer namespaces parser sequences sets tools.test vocabs.parser words
-;
+lexer namespaces parser sequences sets summary tools.test
+vocabs.parser words ;
 IN: alien.parser.tests
 
 <<
@@ -46,6 +46,11 @@ IN: alien.parser.tests
     { "ayae" } [ parse-enum-name new-definitions get first in? ] with-parsing
 ] unit-test
 
+! validate-c-type-name
+{ "Cannot define a C type “hello*” that ends with an asterisk (*)" } [
+    [ "hello*" validate-c-type-name ] [ ] recover summary
+] unit-test
+
 >>
 
 TYPEDEF: char char2
index 74103a0d9d7a3ea946e73ac52d63217ebf0ff108..b15c6e5a1fa2b7ffd19c7c99cef4f60fd76655af 100755 (executable)
@@ -3,7 +3,7 @@
 USING: accessors alien alien.c-types alien.enums alien.libraries
 arrays classes classes.parser combinators combinators.short-circuit
 compiler.units effects fry kernel lexer locals math namespaces parser
-sequences splitting vocabs.parser words ;
+sequences splitting summary vocabs.parser words ;
 IN: alien.parser
 
 SYMBOL: current-library
@@ -54,6 +54,11 @@ ERROR: bad-array-type ;
 
 ERROR: *-in-c-type-name name ;
 
+M: *-in-c-type-name summary
+    name>>
+    "Cannot define a C type “"
+    "” that ends with an asterisk (*)" surround ;
+
 : validate-c-type-name ( name -- name )
     dup "*" tail?
     [ *-in-c-type-name ] when ;
index 15bbec1be8095cc9a1dcfa82164083497212ae7a..6c80931c43eb0d40f8c14b72cabdd5b1571037b5 100644 (file)
@@ -16,7 +16,6 @@ IN: bootstrap.compiler
 ] unless
 
 { "boostrap.compiler" "prettyprint" } "alien.prettyprint" require-when
-{ "boostrap.compiler" "debugger" } "alien.debugger" require-when
 
 "cpu." cpu name>> append require