]> gitweb.factorcode.org Git - factor.git/blob - misc/fuel/strange-syntax.factor
FUEL: fix highlighting of strings escaping quote characters
[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 kernel 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
16 ! ! Strings
17 "containing \"escapes" drop
18
19 ! ! Symbol names
20
21 ! All slashes are symbol constituents.
22 : hack/slash ( -- x ) 10 ;
23
24 : slash\hack ( -- y ) 20 ;
25
26 TUPLE: oh\no ;
27
28 ! As are quotes
29 : don't-do-that ( x -- y ) ;
30
31 ! Double quotes aren't right yet.
32 ! : do-"that" ( x -- y ) ;
33
34 ! ! C-TYPE
35 C-TYPE: cairo_snurface_t
36
37 ! ! CHAR
38 : stuff-with-chars ( -- K \n )
39     CHAR: K
40     CHAR: \n ;
41
42 ! ! MAIN
43 : majn ( -- ) ;
44
45 MAIN: majn
46
47 ! ! SLOT
48  SLOT: komba
49
50 ! ! SYNTAX
51 <<
52 SYNTAX: ID-SYNTAX ;
53 >>
54
55 ID-SYNTAX ID-SYNTAX
56
57 ! ! Numbers
58 { -55 -0x10 100,00 1,000,000 0x2000,0000 0b01 } drop