line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. |
2
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or |
3
|
|
|
|
|
|
|
# modify it under the same terms as Perl itself. |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# This file was generated from the 'objectivec.xml' file of the syntax highlight |
6
|
|
|
|
|
|
|
# engine of the kate text editor (http://www.kate-editor.org |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#kate xml version 1.07 |
9
|
|
|
|
|
|
|
#kate version 2.3 |
10
|
|
|
|
|
|
|
#generated: Sun Feb 3 22:02:05 2008, localtime |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package Syntax::Highlight::Engine::Kate::ObjectiveminusC; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.14'; |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
488
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
24
|
|
17
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
18
|
1
|
|
|
1
|
|
5
|
use base('Syntax::Highlight::Engine::Kate::Template'); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
935
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub new { |
21
|
1
|
|
|
1
|
0
|
528
|
my $proto = shift; |
22
|
1
|
|
33
|
|
|
6
|
my $class = ref($proto) || $proto; |
23
|
1
|
|
|
|
|
6
|
my $self = $class->SUPER::new(@_); |
24
|
1
|
|
|
|
|
12
|
$self->attributes({ |
25
|
|
|
|
|
|
|
'Char' => 'Char', |
26
|
|
|
|
|
|
|
'Comment' => 'Comment', |
27
|
|
|
|
|
|
|
'Data Type' => 'DataType', |
28
|
|
|
|
|
|
|
'Decimal' => 'DecVal', |
29
|
|
|
|
|
|
|
'Float' => 'Float', |
30
|
|
|
|
|
|
|
'Hex' => 'BaseN', |
31
|
|
|
|
|
|
|
'Keyword' => 'Keyword', |
32
|
|
|
|
|
|
|
'Normal Text' => 'Normal', |
33
|
|
|
|
|
|
|
'Octal' => 'BaseN', |
34
|
|
|
|
|
|
|
'Prep. Lib' => 'Others', |
35
|
|
|
|
|
|
|
'Preprocessor' => 'Others', |
36
|
|
|
|
|
|
|
'String' => 'String', |
37
|
|
|
|
|
|
|
'String Char' => 'Char', |
38
|
|
|
|
|
|
|
'Symbol' => 'Normal', |
39
|
|
|
|
|
|
|
}); |
40
|
1
|
|
|
|
|
5
|
$self->listAdd('keywords', |
41
|
|
|
|
|
|
|
'@class', |
42
|
|
|
|
|
|
|
'@defs', |
43
|
|
|
|
|
|
|
'@encode', |
44
|
|
|
|
|
|
|
'@end', |
45
|
|
|
|
|
|
|
'@implementation', |
46
|
|
|
|
|
|
|
'@interface', |
47
|
|
|
|
|
|
|
'@private', |
48
|
|
|
|
|
|
|
'@protected', |
49
|
|
|
|
|
|
|
'@protocol', |
50
|
|
|
|
|
|
|
'@public', |
51
|
|
|
|
|
|
|
'@selector', |
52
|
|
|
|
|
|
|
'break', |
53
|
|
|
|
|
|
|
'case', |
54
|
|
|
|
|
|
|
'continue', |
55
|
|
|
|
|
|
|
'default', |
56
|
|
|
|
|
|
|
'do', |
57
|
|
|
|
|
|
|
'else', |
58
|
|
|
|
|
|
|
'enum', |
59
|
|
|
|
|
|
|
'extern', |
60
|
|
|
|
|
|
|
'for', |
61
|
|
|
|
|
|
|
'goto', |
62
|
|
|
|
|
|
|
'if', |
63
|
|
|
|
|
|
|
'return', |
64
|
|
|
|
|
|
|
'self', |
65
|
|
|
|
|
|
|
'sizeof', |
66
|
|
|
|
|
|
|
'struct', |
67
|
|
|
|
|
|
|
'super', |
68
|
|
|
|
|
|
|
'switch', |
69
|
|
|
|
|
|
|
'typedef', |
70
|
|
|
|
|
|
|
'union', |
71
|
|
|
|
|
|
|
'while', |
72
|
|
|
|
|
|
|
); |
73
|
1
|
|
|
|
|
2
|
$self->listAdd('types', |
74
|
|
|
|
|
|
|
'auto', |
75
|
|
|
|
|
|
|
'char', |
76
|
|
|
|
|
|
|
'const', |
77
|
|
|
|
|
|
|
'double', |
78
|
|
|
|
|
|
|
'float', |
79
|
|
|
|
|
|
|
'int', |
80
|
|
|
|
|
|
|
'long', |
81
|
|
|
|
|
|
|
'register', |
82
|
|
|
|
|
|
|
'short', |
83
|
|
|
|
|
|
|
'signed', |
84
|
|
|
|
|
|
|
'static', |
85
|
|
|
|
|
|
|
'unsigned', |
86
|
|
|
|
|
|
|
'void', |
87
|
|
|
|
|
|
|
'volatile', |
88
|
|
|
|
|
|
|
); |
89
|
1
|
|
|
|
|
11
|
$self->contextdata({ |
90
|
|
|
|
|
|
|
'Default' => { |
91
|
|
|
|
|
|
|
callback => \&parseDefault, |
92
|
|
|
|
|
|
|
attribute => 'Normal Text', |
93
|
|
|
|
|
|
|
}, |
94
|
|
|
|
|
|
|
'MultiLineComment' => { |
95
|
|
|
|
|
|
|
callback => \&parseMultiLineComment, |
96
|
|
|
|
|
|
|
attribute => 'Comment', |
97
|
|
|
|
|
|
|
}, |
98
|
|
|
|
|
|
|
'MultiLineCommentPrep' => { |
99
|
|
|
|
|
|
|
callback => \&parseMultiLineCommentPrep, |
100
|
|
|
|
|
|
|
attribute => 'Comment', |
101
|
|
|
|
|
|
|
}, |
102
|
|
|
|
|
|
|
'Preprocessor' => { |
103
|
|
|
|
|
|
|
callback => \&parsePreprocessor, |
104
|
|
|
|
|
|
|
attribute => 'Preprocessor', |
105
|
|
|
|
|
|
|
lineending => 'Default', |
106
|
|
|
|
|
|
|
}, |
107
|
|
|
|
|
|
|
'SingleLineComment' => { |
108
|
|
|
|
|
|
|
callback => \&parseSingleLineComment, |
109
|
|
|
|
|
|
|
attribute => 'Comment', |
110
|
|
|
|
|
|
|
lineending => '#pop', |
111
|
|
|
|
|
|
|
}, |
112
|
|
|
|
|
|
|
'String' => { |
113
|
|
|
|
|
|
|
callback => \&parseString, |
114
|
|
|
|
|
|
|
attribute => 'String', |
115
|
|
|
|
|
|
|
lineending => '#pop', |
116
|
|
|
|
|
|
|
}, |
117
|
|
|
|
|
|
|
}); |
118
|
1
|
|
|
|
|
4
|
$self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); |
119
|
1
|
|
|
|
|
4
|
$self->basecontext('Default'); |
120
|
1
|
|
|
|
|
4
|
$self->keywordscase(0); |
121
|
1
|
|
|
|
|
2
|
$self->initialize; |
122
|
1
|
|
|
|
|
1
|
bless ($self, $class); |
123
|
1
|
|
|
|
|
3
|
return $self; |
124
|
|
|
|
|
|
|
} |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
sub language { |
127
|
0
|
|
|
0
|
0
|
|
return 'Objective-C'; |
128
|
|
|
|
|
|
|
} |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
sub parseDefault { |
131
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
132
|
|
|
|
|
|
|
# String => 'keywords' |
133
|
|
|
|
|
|
|
# attribute => 'Keyword' |
134
|
|
|
|
|
|
|
# context => '#stay' |
135
|
|
|
|
|
|
|
# type => 'keyword' |
136
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { |
137
|
0
|
|
|
|
|
|
return 1 |
138
|
|
|
|
|
|
|
} |
139
|
|
|
|
|
|
|
# String => 'types' |
140
|
|
|
|
|
|
|
# attribute => 'Data Type' |
141
|
|
|
|
|
|
|
# context => '#stay' |
142
|
|
|
|
|
|
|
# type => 'keyword' |
143
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) { |
144
|
0
|
|
|
|
|
|
return 1 |
145
|
|
|
|
|
|
|
} |
146
|
|
|
|
|
|
|
# attribute => 'Symbol' |
147
|
|
|
|
|
|
|
# beginRegion => 'Brace1' |
148
|
|
|
|
|
|
|
# char => '{' |
149
|
|
|
|
|
|
|
# context => '#stay' |
150
|
|
|
|
|
|
|
# type => 'DetectChar' |
151
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { |
152
|
0
|
|
|
|
|
|
return 1 |
153
|
|
|
|
|
|
|
} |
154
|
|
|
|
|
|
|
# attribute => 'Symbol' |
155
|
|
|
|
|
|
|
# char => '}' |
156
|
|
|
|
|
|
|
# context => '#stay' |
157
|
|
|
|
|
|
|
# endRegion => 'Brace1' |
158
|
|
|
|
|
|
|
# type => 'DetectChar' |
159
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { |
160
|
0
|
|
|
|
|
|
return 1 |
161
|
|
|
|
|
|
|
} |
162
|
|
|
|
|
|
|
# attribute => 'Float' |
163
|
|
|
|
|
|
|
# context => '#stay' |
164
|
|
|
|
|
|
|
# items => 'ARRAY(0x197ace0)' |
165
|
|
|
|
|
|
|
# type => 'Float' |
166
|
0
|
0
|
|
|
|
|
if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { |
167
|
|
|
|
|
|
|
# String => 'fF' |
168
|
|
|
|
|
|
|
# attribute => 'Float' |
169
|
|
|
|
|
|
|
# context => '#stay' |
170
|
|
|
|
|
|
|
# type => 'AnyChar' |
171
|
0
|
0
|
|
|
|
|
if ($self->testAnyChar($text, 'fF', 0, 0, undef, 0, '#stay', 'Float')) { |
172
|
0
|
|
|
|
|
|
return 1 |
173
|
|
|
|
|
|
|
} |
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
# attribute => 'Octal' |
176
|
|
|
|
|
|
|
# context => '#stay' |
177
|
|
|
|
|
|
|
# type => 'HlCOct' |
178
|
0
|
0
|
|
|
|
|
if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) { |
179
|
0
|
|
|
|
|
|
return 1 |
180
|
|
|
|
|
|
|
} |
181
|
|
|
|
|
|
|
# attribute => 'Hex' |
182
|
|
|
|
|
|
|
# context => '#stay' |
183
|
|
|
|
|
|
|
# type => 'HlCHex' |
184
|
0
|
0
|
|
|
|
|
if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) { |
185
|
0
|
|
|
|
|
|
return 1 |
186
|
|
|
|
|
|
|
} |
187
|
|
|
|
|
|
|
# attribute => 'Decimal' |
188
|
|
|
|
|
|
|
# context => '#stay' |
189
|
|
|
|
|
|
|
# items => 'ARRAY(0x1835840)' |
190
|
|
|
|
|
|
|
# type => 'Int' |
191
|
0
|
0
|
|
|
|
|
if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { |
192
|
|
|
|
|
|
|
# String => 'ULL' |
193
|
|
|
|
|
|
|
# attribute => 'Decimal' |
194
|
|
|
|
|
|
|
# context => '#stay' |
195
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
196
|
|
|
|
|
|
|
# type => 'StringDetect' |
197
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'ULL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
198
|
0
|
|
|
|
|
|
return 1 |
199
|
|
|
|
|
|
|
} |
200
|
|
|
|
|
|
|
# String => 'LUL' |
201
|
|
|
|
|
|
|
# attribute => 'Decimal' |
202
|
|
|
|
|
|
|
# context => '#stay' |
203
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
204
|
|
|
|
|
|
|
# type => 'StringDetect' |
205
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'LUL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
206
|
0
|
|
|
|
|
|
return 1 |
207
|
|
|
|
|
|
|
} |
208
|
|
|
|
|
|
|
# String => 'LLU' |
209
|
|
|
|
|
|
|
# attribute => 'Decimal' |
210
|
|
|
|
|
|
|
# context => '#stay' |
211
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
212
|
|
|
|
|
|
|
# type => 'StringDetect' |
213
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'LLU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
214
|
0
|
|
|
|
|
|
return 1 |
215
|
|
|
|
|
|
|
} |
216
|
|
|
|
|
|
|
# String => 'UL' |
217
|
|
|
|
|
|
|
# attribute => 'Decimal' |
218
|
|
|
|
|
|
|
# context => '#stay' |
219
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
220
|
|
|
|
|
|
|
# type => 'StringDetect' |
221
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'UL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
222
|
0
|
|
|
|
|
|
return 1 |
223
|
|
|
|
|
|
|
} |
224
|
|
|
|
|
|
|
# String => 'LU' |
225
|
|
|
|
|
|
|
# attribute => 'Decimal' |
226
|
|
|
|
|
|
|
# context => '#stay' |
227
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
228
|
|
|
|
|
|
|
# type => 'StringDetect' |
229
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'LU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
230
|
0
|
|
|
|
|
|
return 1 |
231
|
|
|
|
|
|
|
} |
232
|
|
|
|
|
|
|
# String => 'LL' |
233
|
|
|
|
|
|
|
# attribute => 'Decimal' |
234
|
|
|
|
|
|
|
# context => '#stay' |
235
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
236
|
|
|
|
|
|
|
# type => 'StringDetect' |
237
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'LL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
238
|
0
|
|
|
|
|
|
return 1 |
239
|
|
|
|
|
|
|
} |
240
|
|
|
|
|
|
|
# String => 'U' |
241
|
|
|
|
|
|
|
# attribute => 'Decimal' |
242
|
|
|
|
|
|
|
# context => '#stay' |
243
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
244
|
|
|
|
|
|
|
# type => 'StringDetect' |
245
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'U', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
246
|
0
|
|
|
|
|
|
return 1 |
247
|
|
|
|
|
|
|
} |
248
|
|
|
|
|
|
|
# String => 'L' |
249
|
|
|
|
|
|
|
# attribute => 'Decimal' |
250
|
|
|
|
|
|
|
# context => '#stay' |
251
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
252
|
|
|
|
|
|
|
# type => 'StringDetect' |
253
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'L', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
254
|
0
|
|
|
|
|
|
return 1 |
255
|
|
|
|
|
|
|
} |
256
|
|
|
|
|
|
|
} |
257
|
|
|
|
|
|
|
# attribute => 'Char' |
258
|
|
|
|
|
|
|
# context => '#stay' |
259
|
|
|
|
|
|
|
# type => 'HlCChar' |
260
|
0
|
0
|
|
|
|
|
if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) { |
261
|
0
|
|
|
|
|
|
return 1 |
262
|
|
|
|
|
|
|
} |
263
|
|
|
|
|
|
|
# attribute => 'String' |
264
|
|
|
|
|
|
|
# char => '"' |
265
|
|
|
|
|
|
|
# context => 'String' |
266
|
|
|
|
|
|
|
# type => 'DetectChar' |
267
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { |
268
|
0
|
|
|
|
|
|
return 1 |
269
|
|
|
|
|
|
|
} |
270
|
|
|
|
|
|
|
# attribute => 'Comment' |
271
|
|
|
|
|
|
|
# char => '/' |
272
|
|
|
|
|
|
|
# char1 => '/' |
273
|
|
|
|
|
|
|
# context => 'SingleLineComment' |
274
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
275
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'SingleLineComment', 'Comment')) { |
276
|
0
|
|
|
|
|
|
return 1 |
277
|
|
|
|
|
|
|
} |
278
|
|
|
|
|
|
|
# attribute => 'Comment' |
279
|
|
|
|
|
|
|
# char => '/' |
280
|
|
|
|
|
|
|
# char1 => '*' |
281
|
|
|
|
|
|
|
# context => 'MultiLineComment' |
282
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
283
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'MultiLineComment', 'Comment')) { |
284
|
0
|
|
|
|
|
|
return 1 |
285
|
|
|
|
|
|
|
} |
286
|
|
|
|
|
|
|
# String => ':!%&()+,-/.*<=>?[]|~^;' |
287
|
|
|
|
|
|
|
# attribute => 'Symbol' |
288
|
|
|
|
|
|
|
# context => '#stay' |
289
|
|
|
|
|
|
|
# type => 'AnyChar' |
290
|
0
|
0
|
|
|
|
|
if ($self->testAnyChar($text, ':!%&()+,-/.*<=>?[]|~^;', 0, 0, undef, 0, '#stay', 'Symbol')) { |
291
|
0
|
|
|
|
|
|
return 1 |
292
|
|
|
|
|
|
|
} |
293
|
|
|
|
|
|
|
# String => '^#' |
294
|
|
|
|
|
|
|
# attribute => 'Preprocessor' |
295
|
|
|
|
|
|
|
# context => 'Preprocessor' |
296
|
|
|
|
|
|
|
# type => 'RegExpr' |
297
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '^#', 0, 0, 0, undef, 0, 'Preprocessor', 'Preprocessor')) { |
298
|
0
|
|
|
|
|
|
return 1 |
299
|
|
|
|
|
|
|
} |
300
|
|
|
|
|
|
|
# attribute => 'String' |
301
|
|
|
|
|
|
|
# char => '@' |
302
|
|
|
|
|
|
|
# char1 => '"' |
303
|
|
|
|
|
|
|
# context => 'String' |
304
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
305
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '@', '"', 0, 0, 0, undef, 0, 'String', 'String')) { |
306
|
0
|
|
|
|
|
|
return 1 |
307
|
|
|
|
|
|
|
} |
308
|
0
|
|
|
|
|
|
return 0; |
309
|
|
|
|
|
|
|
}; |
310
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
sub parseMultiLineComment { |
312
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
313
|
|
|
|
|
|
|
# attribute => 'Comment' |
314
|
|
|
|
|
|
|
# char => '*' |
315
|
|
|
|
|
|
|
# char1 => '/' |
316
|
|
|
|
|
|
|
# context => '#pop' |
317
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
318
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { |
319
|
0
|
|
|
|
|
|
return 1 |
320
|
|
|
|
|
|
|
} |
321
|
0
|
|
|
|
|
|
return 0; |
322
|
|
|
|
|
|
|
}; |
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
sub parseMultiLineCommentPrep { |
325
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
326
|
|
|
|
|
|
|
# attribute => 'Comment' |
327
|
|
|
|
|
|
|
# char => '*' |
328
|
|
|
|
|
|
|
# char1 => '/' |
329
|
|
|
|
|
|
|
# context => '#pop#pop' |
330
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
331
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop#pop', 'Comment')) { |
332
|
0
|
|
|
|
|
|
return 1 |
333
|
|
|
|
|
|
|
} |
334
|
0
|
|
|
|
|
|
return 0; |
335
|
|
|
|
|
|
|
}; |
336
|
|
|
|
|
|
|
|
337
|
|
|
|
|
|
|
sub parsePreprocessor { |
338
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
339
|
|
|
|
|
|
|
# attribute => 'Preprocessor' |
340
|
|
|
|
|
|
|
# context => '#stay' |
341
|
|
|
|
|
|
|
# type => 'LineContinue' |
342
|
0
|
0
|
|
|
|
|
if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Preprocessor')) { |
343
|
0
|
|
|
|
|
|
return 1 |
344
|
|
|
|
|
|
|
} |
345
|
|
|
|
|
|
|
# attribute => 'Prep. Lib' |
346
|
|
|
|
|
|
|
# char => '"' |
347
|
|
|
|
|
|
|
# char1 => '"' |
348
|
|
|
|
|
|
|
# context => '#stay' |
349
|
|
|
|
|
|
|
# type => 'RangeDetect' |
350
|
0
|
0
|
|
|
|
|
if ($self->testRangeDetect($text, '"', '"', 0, 0, undef, 0, '#stay', 'Prep. Lib')) { |
351
|
0
|
|
|
|
|
|
return 1 |
352
|
|
|
|
|
|
|
} |
353
|
|
|
|
|
|
|
# attribute => 'Prep. Lib' |
354
|
|
|
|
|
|
|
# char => '<' |
355
|
|
|
|
|
|
|
# char1 => '>' |
356
|
|
|
|
|
|
|
# context => '#stay' |
357
|
|
|
|
|
|
|
# type => 'RangeDetect' |
358
|
0
|
0
|
|
|
|
|
if ($self->testRangeDetect($text, '<', '>', 0, 0, undef, 0, '#stay', 'Prep. Lib')) { |
359
|
0
|
|
|
|
|
|
return 1 |
360
|
|
|
|
|
|
|
} |
361
|
|
|
|
|
|
|
# context => '##Doxygen' |
362
|
|
|
|
|
|
|
# type => 'IncludeRules' |
363
|
0
|
0
|
|
|
|
|
if ($self->includePlugin('Doxygen', $text)) { |
364
|
0
|
|
|
|
|
|
return 1 |
365
|
|
|
|
|
|
|
} |
366
|
|
|
|
|
|
|
# attribute => 'Comment' |
367
|
|
|
|
|
|
|
# char => '/' |
368
|
|
|
|
|
|
|
# char1 => '/' |
369
|
|
|
|
|
|
|
# context => 'SingleLineComment' |
370
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
371
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'SingleLineComment', 'Comment')) { |
372
|
0
|
|
|
|
|
|
return 1 |
373
|
|
|
|
|
|
|
} |
374
|
|
|
|
|
|
|
# attribute => 'Comment' |
375
|
|
|
|
|
|
|
# char => '/' |
376
|
|
|
|
|
|
|
# char1 => '*' |
377
|
|
|
|
|
|
|
# context => 'MultiLineCommentPrep' |
378
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
379
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'MultiLineCommentPrep', 'Comment')) { |
380
|
0
|
|
|
|
|
|
return 1 |
381
|
|
|
|
|
|
|
} |
382
|
0
|
|
|
|
|
|
return 0; |
383
|
|
|
|
|
|
|
}; |
384
|
|
|
|
|
|
|
|
385
|
|
|
|
|
|
|
sub parseSingleLineComment { |
386
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
387
|
0
|
|
|
|
|
|
return 0; |
388
|
|
|
|
|
|
|
}; |
389
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
sub parseString { |
391
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
392
|
|
|
|
|
|
|
# attribute => 'String' |
393
|
|
|
|
|
|
|
# context => '#stay' |
394
|
|
|
|
|
|
|
# type => 'LineContinue' |
395
|
0
|
0
|
|
|
|
|
if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { |
396
|
0
|
|
|
|
|
|
return 1 |
397
|
|
|
|
|
|
|
} |
398
|
|
|
|
|
|
|
# attribute => 'String Char' |
399
|
|
|
|
|
|
|
# context => '#stay' |
400
|
|
|
|
|
|
|
# type => 'HlCStringChar' |
401
|
0
|
0
|
|
|
|
|
if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) { |
402
|
0
|
|
|
|
|
|
return 1 |
403
|
|
|
|
|
|
|
} |
404
|
|
|
|
|
|
|
# attribute => 'String' |
405
|
|
|
|
|
|
|
# char => '"' |
406
|
|
|
|
|
|
|
# context => '#pop' |
407
|
|
|
|
|
|
|
# type => 'DetectChar' |
408
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { |
409
|
0
|
|
|
|
|
|
return 1 |
410
|
|
|
|
|
|
|
} |
411
|
0
|
|
|
|
|
|
return 0; |
412
|
|
|
|
|
|
|
}; |
413
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
1; |
416
|
|
|
|
|
|
|
|
417
|
|
|
|
|
|
|
__END__ |