]> gitweb.factorcode.org Git - factor.git/blob - basis/definitions/icons/icons.factor
Changing : foo ; parsing to SYNTAX: foo ;
[factor.git] / basis / definitions / icons / icons.factor
1 ! Copyright (C) 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: assocs classes.predicate fry generic io.pathnames kernel
4 macros sequences vocabs words words.symbol words.constant
5 lexer parser help.topics ;
6 IN: definitions.icons
7
8 GENERIC: definition-icon ( definition -- path )
9
10 <PRIVATE
11
12 : definition-icon-path ( string -- string' )
13     "resource:basis/definitions/icons/" prepend-path ".tiff" append ;
14
15 <<
16
17 SYNTAX: ICON:
18     scan-word \ definition-icon create-method
19     scan '[ drop _ definition-icon-path ]
20     define ;
21
22 >>
23
24 ICON: predicate-class class-predicate-word
25 ICON: generic generic-word
26 ICON: macro macro-word
27 ICON: parsing-word parsing-word
28 ICON: primitive primitive-word
29 ICON: symbol symbol-word
30 ICON: constant constant-word
31 ICON: word normal-word
32 ICON: vocab-link unopen-vocab
33 ICON: word-link word-help-article
34 ICON: link help-article
35
36 PRIVATE>
37
38 M: vocab definition-icon
39     vocab-main "runnable-vocab" "open-vocab" ? definition-icon-path ;
40