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 alt-color foreground associate swap assoc-union ; : string-style ( str -- 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 ;