! Copyright (C) 2003, 2006 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. IN: prettyprint USING: arrays generic hashtables io kernel math namespaces sequences strings styles words ; GENERIC: definition ( spec -- quot ? ) M: word definition drop f f ; M: compound definition word-def t ; M: generic definition "combination" word-prop t ; M: method-spec definition first2 method t ; GENERIC: see ( spec -- ) GENERIC: declarations. ( obj -- ) M: object declarations. drop ; : declaration. ( word prop -- ) tuck word-name word-prop [ pprint-word ] [ drop ] if ; M: word declarations. { POSTPONE: parsing POSTPONE: inline POSTPONE: foldable } [ declaration. ] each-with ; : pprint-; \ ; pprint-word ; : (see) ( spec -- ) [ dup (synopsis) dup definition [ H{ }