! Copyright (C) 2009 Keith Lazuka. ! See http://factorcode.org/license.txt for BSD license. USING: assocs colors.constants combinators combinators.short-circuit hashtables io.styles kernel literals namespaces sequences words words.symbol ; IN: prettyprint.stylesheet GENERIC: word-style ( word -- style ) M: word word-style [ presented associate ] [ "word-style" word-prop >hashtable ] bi assoc-union ; PREDICATE: highlighted-word < word [ parsing-word? ] [ delimiter? ] bi or ; M: highlighted-word word-style call-next-method COLOR: DarkSlateGray foreground associate swap assoc-union ; : string-style ( str -- style ) COLOR: LightSalmon4 colored-presentation-style ; : vocab-style ( vocab -- style ) dim-color colored-presentation-style ; : effect-style ( effect -- style ) COLOR: DarkGreen colored-presentation-style ;