Kate/ObjectiveminusC.pm

filter: Statementstmt 22.8% 24 / 105 Branchbran 0.0% 0 / 70 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 36.3% 4 / 11 Podpod 0.0% 0 / 8 totaltotal 14.5% 29 / 199 CC 37 SCAR 58.8
CC
37
Cov
14%
parseDefault
650.0
parsePreprocessor
56.0
parseString
20.0
CRAP 356.5
« Kate/C.pm ↑ Summary Kate/SQL_MySQL.pm »
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 1 our $VERSION = '0.16';
15  
16 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶use base('Syntax::Highlight::Engine::Kate::Template');
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 1 ▶sub new {
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
21 1 my $proto = shift;
22 1 ▶ my $class = ref($proto) || $proto;
Condition33%1/3
ref $proto || $proto
l!l&&r!l&&!r
010
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
23 1 my $self = $class->SUPER::new(@_);
24 1 $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 $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 $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 $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 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
119 1 $self->basecontext('Default');
120 1 $self->keywordscase(0);
121 1 $self->initialize;
122 1 bless ($self, $class);
123 1 return $self;
124 }
125  
126 0 ▶sub language {
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
127 0 return 'Objective-C';
128 }
129  
130 0 ▶sub parseDefault {
Subroutine parseDefault: not called CC=25 SCAR=64.8
Pod undocumented
131 0 my ($self, $text) = @_;
132 # String => 'keywords'
133 # attribute => 'Keyword'
134 # context => '#stay'
135 # type => 'keyword'
136 0 ▶ if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "keywords", 0, undef, 0, "#stay", "Keyword")) 0 0 0
137 0 return 1
138 }
139 # String => 'types'
140 # attribute => 'Data Type'
141 # context => '#stay'
142 # type => 'keyword'
143 0 ▶ if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "types", 0, undef, 0, "#stay", "Data Type")) 0 0 0
144 0 return 1
145 }
146 # attribute => 'Symbol'
147 # beginRegion => 'Brace1'
148 # char => '{'
149 # context => '#stay'
150 # type => 'DetectChar'
151 0 ▶ if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Symbol')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "{", 0, 0, 0, undef, 0, "#stay", "Symbol")) 0 0 0
152 0 return 1
153 }
154 # attribute => 'Symbol'
155 # char => '}'
156 # context => '#stay'
157 # endRegion => 'Brace1'
158 # type => 'DetectChar'
159 0 ▶ if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Symbol')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "}", 0, 0, 0, undef, 0, "#stay", "Symbol")) 0 0 0
160 0 return 1
161 }
162 # attribute => 'Float'
163 # context => '#stay'
164 # items => 'ARRAY(0x197ace0)'
165 # type => 'Float'
166 0 ▶ if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testFloat($text, 0, undef, 0, "#stay", "Float")) 0 0 0
167 # String => 'fF'
168 # attribute => 'Float'
169 # context => '#stay'
170 # type => 'AnyChar'
171 0 ▶ if ($self->testAnyChar($text, 'fF', 0, 0, undef, 0, '#stay', 'Float')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testAnyChar($text, "fF", 0, 0, undef, 0, "#stay", "Float")) 0 0 0
172 0 return 1
173 }
174 }
175 # attribute => 'Octal'
176 # context => '#stay'
177 # type => 'HlCOct'
178 0 ▶ if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCOct($text, 0, undef, 0, "#stay", "Octal")) 0 0 0
179 0 return 1
180 }
181 # attribute => 'Hex'
182 # context => '#stay'
183 # type => 'HlCHex'
184 0 ▶ if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCHex($text, 0, undef, 0, "#stay", "Hex")) 0 0 0
185 0 return 1
186 }
187 # attribute => 'Decimal'
188 # context => '#stay'
189 # items => 'ARRAY(0x1835840)'
190 # type => 'Int'
191 0 ▶ if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testInt($text, 0, undef, 0, "#stay", "Decimal")) 0 0 0
192 # String => 'ULL'
193 # attribute => 'Decimal'
194 # context => '#stay'
195 # insensitive => 'TRUE'
196 # type => 'StringDetect'
197 0 ▶ if ($self->testStringDetect($text, 'ULL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "ULL", 1, 0, 0, undef, 0, "#stay", "Decimal")) 0 0 0
198 0 return 1
199 }
200 # String => 'LUL'
201 # attribute => 'Decimal'
202 # context => '#stay'
203 # insensitive => 'TRUE'
204 # type => 'StringDetect'
205 0 ▶ if ($self->testStringDetect($text, 'LUL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "LUL", 1, 0, 0, undef, 0, "#stay", "Decimal")) 0 0 0
206 0 return 1
207 }
208 # String => 'LLU'
209 # attribute => 'Decimal'
210 # context => '#stay'
211 # insensitive => 'TRUE'
212 # type => 'StringDetect'
213 0 ▶ if ($self->testStringDetect($text, 'LLU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "LLU", 1, 0, 0, undef, 0, "#stay", "Decimal")) 0 0 0
214 0 return 1
215 }
216 # String => 'UL'
217 # attribute => 'Decimal'
218 # context => '#stay'
219 # insensitive => 'TRUE'
220 # type => 'StringDetect'
221 0 ▶ if ($self->testStringDetect($text, 'UL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "UL", 1, 0, 0, undef, 0, "#stay", "Decimal")) 0 0 0
222 0 return 1
223 }
224 # String => 'LU'
225 # attribute => 'Decimal'
226 # context => '#stay'
227 # insensitive => 'TRUE'
228 # type => 'StringDetect'
229 0 ▶ if ($self->testStringDetect($text, 'LU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "LU", 1, 0, 0, undef, 0, "#stay", "Decimal")) 0 0 0
230 0 return 1
231 }
232 # String => 'LL'
233 # attribute => 'Decimal'
234 # context => '#stay'
235 # insensitive => 'TRUE'
236 # type => 'StringDetect'
237 0 ▶ if ($self->testStringDetect($text, 'LL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "LL", 1, 0, 0, undef, 0, "#stay", "Decimal")) 0 0 0
238 0 return 1
239 }
240 # String => 'U'
241 # attribute => 'Decimal'
242 # context => '#stay'
243 # insensitive => 'TRUE'
244 # type => 'StringDetect'
245 0 ▶ if ($self->testStringDetect($text, 'U', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "U", 1, 0, 0, undef, 0, "#stay", "Decimal")) 0 0 0
246 0 return 1
247 }
248 # String => 'L'
249 # attribute => 'Decimal'
250 # context => '#stay'
251 # insensitive => 'TRUE'
252 # type => 'StringDetect'
253 0 ▶ if ($self->testStringDetect($text, 'L', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "L", 1, 0, 0, undef, 0, "#stay", "Decimal")) 0 0 0
254 0 return 1
255 }
256 }
257 # attribute => 'Char'
258 # context => '#stay'
259 # type => 'HlCChar'
260 0 ▶ if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCChar($text, 0, undef, 0, "#stay", "Char")) 0 0 0
261 0 return 1
262 }
263 # attribute => 'String'
264 # char => '"'
265 # context => 'String'
266 # type => 'DetectChar'
267 0 ▶ if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\"", 0, 0, 0, undef, 0, "String", "String")) 0 0 0
268 0 return 1
269 }
270 # attribute => 'Comment'
271 # char => '/'
272 # char1 => '/'
273 # context => 'SingleLineComment'
274 # type => 'Detect2Chars'
275 0 ▶ if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'SingleLineComment', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "/", 0, 0, 0, undef, 0, "SingleLineComment", "Comment")) 0 0 0
276 0 return 1
277 }
278 # attribute => 'Comment'
279 # char => '/'
280 # char1 => '*'
281 # context => 'MultiLineComment'
282 # type => 'Detect2Chars'
283 0 ▶ if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'MultiLineComment', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "*", 0, 0, 0, undef, 0, "MultiLineComment", "Comment")) 0 0 0
284 0 return 1
285 }
286 # String => ':!%&()+,-/.*<=>?[]|~^;'
287 # attribute => 'Symbol'
288 # context => '#stay'
289 # type => 'AnyChar'
290 0 ▶ if ($self->testAnyChar($text, ':!%&()+,-/.*<=>?[]|~^;', 0, 0, undef, 0, '#stay', 'Symbol')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testAnyChar($text, ":!%&()+,-/.*<=>?[]|~^;", 0, 0, undef, 0, "#stay", "Symbol")) 0 0 0
291 0 return 1
292 }
293 # String => '^#'
294 # attribute => 'Preprocessor'
295 # context => 'Preprocessor'
296 # type => 'RegExpr'
297 0 ▶ if ($self->testRegExpr($text, '^#', 0, 0, 0, undef, 0, 'Preprocessor', 'Preprocessor')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "^#", 0, 0, 0, undef, 0, "Preprocessor", "Preprocessor")) 0 0 0
298 0 return 1
299 }
300 # attribute => 'String'
301 # char => '@'
302 # char1 => '"'
303 # context => 'String'
304 # type => 'Detect2Chars'
305 0 ▶ if ($self->testDetect2Chars($text, '@', '"', 0, 0, 0, undef, 0, 'String', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "\@", "\"", 0, 0, 0, undef, 0, "String", "String")) 0 0 0
306 0 return 1
307 }
308 0 return 0;
309 };
310  
311 0 ▶sub parseMultiLineComment {
Subroutine parseMultiLineComment: not called CC=2 SCAR=17.9
Pod undocumented
312 0 my ($self, $text) = @_;
313 # attribute => 'Comment'
314 # char => '*'
315 # char1 => '/'
316 # context => '#pop'
317 # type => 'Detect2Chars'
318 0 ▶ if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "*", "/", 0, 0, 0, undef, 0, "#pop", "Comment")) 0 0 0
319 0 return 1
320 }
321 0 return 0;
322 };
323  
324 0 ▶sub parseMultiLineCommentPrep {
Subroutine parseMultiLineCommentPrep: not called CC=2 SCAR=17.9
Pod undocumented
325 0 my ($self, $text) = @_;
326 # attribute => 'Comment'
327 # char => '*'
328 # char1 => '/'
329 # context => '#pop#pop'
330 # type => 'Detect2Chars'
331 0 ▶ if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop#pop', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "*", "/", 0, 0, 0, undef, 0, "#pop#pop", "Comment")) 0 0 0
332 0 return 1
333 }
334 0 return 0;
335 };
336  
337 0 ▶sub parsePreprocessor {
Subroutine parsePreprocessor: not called CC=7 SCAR=40.3
Pod undocumented
338 0 my ($self, $text) = @_;
339 # attribute => 'Preprocessor'
340 # context => '#stay'
341 # type => 'LineContinue'
342 0 ▶ if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Preprocessor')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testLineContinue($text, 0, undef, 0, "#stay", "Preprocessor")) 0 0 0
343 0 return 1
344 }
345 # attribute => 'Prep. Lib'
346 # char => '"'
347 # char1 => '"'
348 # context => '#stay'
349 # type => 'RangeDetect'
350 0 ▶ if ($self->testRangeDetect($text, '"', '"', 0, 0, undef, 0, '#stay', 'Prep. Lib')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRangeDetect($text, "\"", "\"", 0, 0, undef, 0, "#stay", "Prep. Lib")) 0 0 0
351 0 return 1
352 }
353 # attribute => 'Prep. Lib'
354 # char => '<'
355 # char1 => '>'
356 # context => '#stay'
357 # type => 'RangeDetect'
358 0 ▶ if ($self->testRangeDetect($text, '<', '>', 0, 0, undef, 0, '#stay', 'Prep. Lib')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRangeDetect($text, "<", ">", 0, 0, undef, 0, "#stay", "Prep. Lib")) 0 0 0
359 0 return 1
360 }
361 # context => '##Doxygen'
362 # type => 'IncludeRules'
363 0 ▶ if ($self->includePlugin('Doxygen', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includePlugin("Doxygen", $text)) 0 0 0
364 0 return 1
365 }
366 # attribute => 'Comment'
367 # char => '/'
368 # char1 => '/'
369 # context => 'SingleLineComment'
370 # type => 'Detect2Chars'
371 0 ▶ if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'SingleLineComment', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "/", 0, 0, 0, undef, 0, "SingleLineComment", "Comment")) 0 0 0
372 0 return 1
373 }
374 # attribute => 'Comment'
375 # char => '/'
376 # char1 => '*'
377 # context => 'MultiLineCommentPrep'
378 # type => 'Detect2Chars'
379 0 ▶ if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'MultiLineCommentPrep', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "*", 0, 0, 0, undef, 0, "MultiLineCommentPrep", "Comment")) 0 0 0
380 0 return 1
381 }
382 0 return 0;
383 };
384  
385 0 ▶sub parseSingleLineComment {
Subroutine parseSingleLineComment: not called CC=1 SCAR=6.9
Pod undocumented
386 0 my ($self, $text) = @_;
387 0 return 0;
388 };
389  
390 0 ▶sub parseString {
Subroutine parseString: not called CC=4 SCAR=30.0
Pod undocumented
391 0 my ($self, $text) = @_;
392 # attribute => 'String'
393 # context => '#stay'
394 # type => 'LineContinue'
395 0 ▶ if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testLineContinue($text, 0, undef, 0, "#stay", "String")) 0 0 0
396 0 return 1
397 }
398 # attribute => 'String Char'
399 # context => '#stay'
400 # type => 'HlCStringChar'
401 0 ▶ if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCStringChar($text, 0, undef, 0, "#stay", "String Char")) 0 0 0
402 0 return 1
403 }
404 # attribute => 'String'
405 # char => '"'
406 # context => '#pop'
407 # type => 'DetectChar'
408 0 ▶ if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\"", 0, 0, 0, undef, 0, "#pop", "String")) 0 0 0
409 0 return 1
410 }
411 0 return 0;
412 };
413  
414  
415 1 1;
416  
417 __END__
« Kate/C.pm ↑ Summary Kate/SQL_MySQL.pm »