tools.annotations: add a predicate class for annotated words.
parent
7cb973009a
commit
c6810293a0
|
@ -29,12 +29,12 @@ ERROR: cannot-annotate-twice word ;
|
||||||
|
|
||||||
M: cannot-annotate-twice summary drop "Cannot annotate a word twice" ;
|
M: cannot-annotate-twice summary drop "Cannot annotate a word twice" ;
|
||||||
|
|
||||||
|
PREDICATE: annotated < word "unannotated-def" word-prop >boolean ;
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
||||||
: check-annotate-twice ( word -- word )
|
: check-annotate-twice ( word -- word )
|
||||||
dup "unannotated-def" word-prop [
|
dup annotated? [ cannot-annotate-twice ] when ;
|
||||||
cannot-annotate-twice
|
|
||||||
] when ;
|
|
||||||
|
|
||||||
: annotate-generic ( word quot -- )
|
: annotate-generic ( word quot -- )
|
||||||
[ "methods" word-prop values ] dip each ; inline
|
[ "methods" word-prop values ] dip each ; inline
|
||||||
|
|
Loading…
Reference in New Issue