]> gitweb.factorcode.org Git - factor.git/blob - misc/fuel/strange-syntax.factor
FUEL: syntax debugging file
[factor.git] / misc / fuel / strange-syntax.factor
1 ! FUEL Syntax Demo
2 !
3 ! The purpose of this file is to test that corner cases are
4 ! highlighted correctly by FUEL. So if you change something in the
5 ! syntax highlighting and it breaks, things will be badly hightlighted
6 ! here.
7 USING: alien.syntax help.syntax math ;
8 IN: strange-syntax
9
10 TUPLE: a-tuple slot1 slot2 { slot3 integer } ;
11   TUPLE: second-one ;
12
13     USING: tools.test ;
14
15 ! ! Symbol names
16
17 ! All slashes are symbol constituents.
18 : hack/slash ( -- x ) 10 ;
19
20 : slash\hack ( -- y ) 20 ;
21
22 ! As are quotes
23 : don't-do-that ( x -- y ) ;
24
25 ! Double quotes aren't right yet.
26 ! : do-"that" ( x -- y ) ;
27
28 ! ! C-TYPE
29 C-TYPE: cairo_snurface_t
30
31 ! ! CHAR
32 : stuff-with-chars ( -- K \n )
33     CHAR: K
34     CHAR: \n ;
35
36 ! ! MAIN
37 : majn ( -- ) ;
38
39 MAIN: majn
40
41 ! ! SLOT
42  SLOT: komba
43
44 ! ! SYNTAX
45 <<
46 SYNTAX: ID-SYNTAX ;
47 >>
48
49 ID-SYNTAX ID-SYNTAX