! Copyright (C) 2009 Your name. ! See http://factorcode.org/license.txt for BSD license. USING: colors.constants combinators combinators.short-circuit hashtables io.styles kernel namespaces sequences words words.symbol ; IN: prettyprint.stylesheet : word-style ( word -- style ) dup "word-style" word-prop >hashtable [ [ [ presented set ] [ { { [ dup parsing-word? ] [ parsing-word-color ] } { [ dup delimiter? ] [ drop COLOR: DarkSlateGray ] } { [ dup symbol? ] [ drop COLOR: DarkSlateGray ] } [ drop COLOR: black ] } cond foreground set ] bi ] bind ] keep ; : string-style ( obj -- style ) [ presented set COLOR: LightSalmon4 foreground set ] H{ } make-assoc ; : vocab-style ( vocab -- style ) [ presented set dim-color foreground set ] H{ } make-assoc ; : effect-style ( effect -- style ) [ presented set COLOR: DarkGreen foreground set ] H{ } make-assoc ;