1 ! Copyright (C) 2008 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors definitions effects kernel quotations
7 PREDICATE: alias < word "alias" word-prop ;
9 : define-alias ( new old -- )
10 [ [ 1quotation ] [ stack-effect ] bi define-inline ]
11 [ drop t "alias" set-word-prop ]
12 [ parsing-word? [ t "parsing" set-word-prop ] [ drop ] if ] 2tri ;
15 [ call-next-method ] [ "alias" remove-word-prop ] bi ;
17 M: alias definer drop \ ALIAS: f ;