add-coverage ( object -- ) - Factor Documentation

add-coverage ( object -- )
Coverage tool



Vocabulary
tools .coverage

Inputs
object an object


Outputs
None

Word description
Recompiles a vocabulary with the coverage annotation. Note that the annotation tool is still disabled until you call coverage-on .

Definition
IN: tools.coverage

GENERIC: add-coverage ( object -- )


Methods
USING: strings tools.coverage ;

M: string add-coverage [ add-coverage ] each-word ;


USING: assocs kernel sequences tools.annotations tools.coverage
words ;

M: word add-coverage
H{ } clone [ "coverage" set-word-prop ] 2keep
[ set-at ] curry [ [ \ coverage-state new ] ] dip
[ 2keep [ flag-covered ] curry prepend ] curry compose
deep-annotate ;

AltStyle によって変換されたページ (->オリジナル) /