]> gitweb.factorcode.org Git - factor.git/commitdiff
fix synopsis for C-TYPE:, TYPEDEF:, and FUNCTION: so they properly show IN: clause
authorJoe Groff <arcata@gmail.com>
Mon, 21 Sep 2009 04:12:31 +0000 (23:12 -0500)
committerJoe Groff <arcata@gmail.com>
Mon, 21 Sep 2009 04:12:31 +0000 (23:12 -0500)
basis/alien/prettyprint/prettyprint.factor

index 4586c0854292f278a931bad17bbca53917e02346..e17d4c053378f7ba1e490feae297fd79f7e0452a 100644 (file)
@@ -17,7 +17,7 @@ M: dll pprint* dll-path dup "DLL\" " "\"" pprint-string ;
 
 M: c-type-word definer drop \ C-TYPE: f ;
 M: c-type-word definition drop f ;
-M: typedef-word declarations. drop ;
+M: c-type-word declarations. drop ;
 
 GENERIC: pprint-c-type ( c-type -- )
 M: word pprint-c-type pprint-word ;
@@ -28,9 +28,12 @@ M: array pprint-c-type pprint* ;
 M: typedef-word definer drop \ TYPEDEF: f ;
 
 M: typedef-word synopsis*
-    \ TYPEDEF: pprint-word
-    dup "c-type" word-prop pprint-c-type
-    pprint-word ;
+    {
+        [ seeing-word ]
+        [ definer. ]
+        [ "c-type" word-prop pprint-c-type ]
+        [ pprint-word ]
+    } cleave ;
 
 : pprint-function-arg ( type name -- )
     [ pprint-c-type ] [ text ] bi* ;
@@ -46,7 +49,10 @@ M: alien-function-word definer
     drop \ FUNCTION: \ ; ;
 M: alien-function-word definition drop f ;
 M: alien-function-word synopsis*
-    \ FUNCTION: pprint-word
-    [ def>> first pprint-c-type ]
-    [ pprint-word ]
-    [ <block "(" text pprint-function-args ")" text block> ] tri ;
+    {
+        [ seeing-word ]
+        [ definer. ]
+        [ def>> first pprint-c-type ]
+        [ pprint-word ]
+        [ <block "(" text pprint-function-args ")" text block> ]
+    } cleave ;