Updated doc/NEWS file
[midnight-commander.git] / misc / syntax / ruby.syntax
blob61191f026eaf4f7a5850036b3e9c340c3b5ad7e5
1 #Ruby syntax file derived from perl syntax by Marco Ciampa <ciampix@libero.it>
2 #alpha version 0.2 16/05/2003
4 context default
6 #Bang path
8     keyword whole linestart #!\[\s\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/bin/ruby brightcyan black
9     keyword whole linestart #!\[\s\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/bin/ruby brightcyan black
10     keyword whole linestart #!\[\s\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/bin/ruby brightcyan black
11     keyword whole linestart #!\[\s\]/\[abcdefghijklmnopqrstuvwxyz\]/bin/ruby brightcyan black
12     keyword whole linestart #!\[\s\]/bin/ruby brightcyan black
14 # Symbols :bla-bla
15     keyword whole \:\{ABCDEFGHIJKLMNOPQRSTUVWXYZ_\-abcdefghijklmnopqrstuvwxyz\}\[\?\-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\] white
17 #Operators
19     keyword > yellow
20     keyword < yellow
21     keyword - yellow
22     keyword \+ yellow
23     keyword \* yellow
24     keyword / yellow
25     keyword % yellow
26     keyword = yellow
27     keyword \+= yellow
28     keyword -= yellow
29     keyword == yellow
30     keyword != yellow
31     keyword === yellow
32     keyword <=> yellow
33     keyword ! yellow
34     keyword ~ yellow
35     keyword =~ yellow
36     keyword & yellow
37     keyword | yellow
38     keyword .. yellow
40 #System variables
42 # hack for regexps
43     keyword $/ yellow
44     keyword $\{!@&\+`'=~/\\,.;<>_\*"$:F?\} red
45     keyword $\{\0123456789\} red
46     keyword $-+ red
48     keyword whole $defout red
49     keyword whole $DEBUG red
50     keyword whole $F red
51     keyword whole $FILENAME red
52     keyword whole $LOAD_PATH red
53     keyword whole $SAFE red
54     keyword whole $VERBOSE red
55     keyword whole __FILE__ red
56     keyword whole __LINE__ red
57     keyword whole BEGIN red
58     keyword whole END red
59     keyword whole DATA red
60     keyword whole RUBY_PLATFORM red
61     keyword whole RUBY_RELEASE_DATE red
62     keyword whole RUBY_VERSION red
63     keyword whole $stdin red
64     keyword whole STDIN red
65     keyword whole $stdout red
66     keyword whole STDOUT red
67     keyword whole $stderr red
68     keyword whole STDERR red
69     keyword whole argv red
70     keyword whole ARGV red
71     keyword whole ARGF red
72     keyword whole env red
73     keyword whole ENV red
75 #Braces &
77     keyword { brightcyan
78     keyword } brightcyan
79     keyword ( brightcyan
80     keyword ) brightcyan
81     keyword [ brightcyan
82     keyword ] brightcyan
83     keyword , brightcyan
84     keyword : brightcyan
86     keyword whole false brightred
87     keyword whole FALSE brightred
88     keyword whole nil brightred
89     keyword whole NIL brightred
90     keyword whole true brightred
91     keyword whole TRUE brightred
93 #Variables
95     keyword wholeright $+ brightgreen
96     keyword wholeright @+ white
97     keyword \\" brightred
98     keyword \\' brightred
100 #Reserved words (see ruby manual)
102     keyword whole def magenta
104     keyword whole alias magenta
105     keyword whole and magenta
106     keyword whole begin magenta
107     keyword whole break magenta
108     keyword whole case magenta
109     keyword whole class magenta
110     keyword whole defined\? magenta
111     keyword whole do magenta
112     keyword whole else magenta
113     keyword whole elsif magenta
114     keyword whole end magenta
115     keyword whole ensure magenta
116     keyword whole for magenta
117     keyword whole if magenta
118     keyword whole in magenta
119     keyword whole module magenta
120     keyword whole next magenta
121     keyword whole not magenta
122     keyword whole or magenta
123     keyword whole redo magenta
124     keyword whole rescue magenta
125     keyword whole retry magenta
126     keyword whole return magenta
127     keyword whole self magenta
128     keyword whole super magenta
129     keyword whole then magenta
130     keyword whole undef magenta
131     keyword whole unless magenta
132     keyword whole until magenta
133     keyword whole when magenta
134     keyword whole while magenta
135     keyword whole yeld magenta
137 #First class methods
139     keyword whole new yellow
140     keyword whole inherited yellow
141     keyword whole superclass yellow
143 #Class module
144 #   exclusion
145     keyword whole include\? green
146     keyword whole include magenta
147     keyword whole require magenta
148     keyword whole require_relative magenta
149 #    keyword whole where magenta
151 #Class numeric
153     keyword whole abs red
154     keyword whole modulo red
155     keyword whole remainder red
157 #Class IO
159     keyword whole close yellow
160     keyword whole crypt yellow
161     keyword whole delete yellow
162     keyword whole each yellow
163     keyword whole gets yellow
164     keyword whole grep yellow
165     keyword whole inspect yellow
166     keyword whole join yellow
167     keyword whole sync yellow
169 #Class Array
171     keyword whole index yellow
172     keyword whole indexes yellow
173     keyword whole indices yellow
174     keyword whole size yellow
175     keyword whole pop yellow
176     keyword whole push yellow
177     keyword whole sort yellow
178     keyword whole shift yellow
179     keyword whole unshift yellow
181 #Math module
183     keyword whole Math::PI red
184     keyword whole Math::E red
185     keyword whole atan2 red
186     keyword whole cos red
187     keyword whole exp red
188     keyword whole frexp red
189     keyword whole ldexp red
190     keyword whole log red
191     keyword whole log10 red
192     keyword whole sin red
193     keyword whole sqrt red
194     keyword whole tan red
196 #Kernel module
198     keyword whole chomp yellow
199     keyword whole chomp! yellow
200     keyword whole chop yellow
201     keyword whole chop! yellow
202     keyword whole raise yellow
203     keyword whole fork yellow
204     keyword whole rand yellow
205     keyword whole srand yellow
206     keyword whole open yellow
207     keyword whole print yellow
208     keyword whole printf yellow
209     keyword whole sprintf yellow
210     keyword whole exec yellow
211     keyword whole eval yellow
212     keyword whole exit yellow
213     keyword whole sleep yellow
215 #this works only with label EOF :-(
216 #context exclusive whole <<\[\s\]EOF EOF green
218 context # \n brown
219     spellcheck
221 context " " green
222     keyword \\" brightgreen
223     keyword \\\\ brightgreen
225 context ' ' brightgreen
226     keyword \\' green
227     keyword \\\\ green
229 context exclusive ` ` white black