Kate/IDL.pm

filter: Statementstmt 25.2% 24 / 95 Branchbran 0.0% 0 / 52 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 28.5% 4 / 14 Podpod 0.0% 0 / 11 totaltotal 16.3% 29 / 177 SCAR 61.8
CC
28
Cov
17%
parseNormal
182.0
parsePreprocessor
42.0
parseString
20.0
CRAP 481.7
« Kate/Debian_Control.pm ↑ Summary Kate/ILERPG.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 'idl.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.4
10 #generated: Sun Feb 3 22:02:05 2008, localtime
11  
12 package Syntax::Highlight::Engine::Kate::IDL;
13  
14 1 our $VERSION = '0.14';
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 sub new {
21 1 ▶ my $proto = shift;
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
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 'Alert' => 'Alert',
26 'Char' => 'Char',
27 'Comment' => 'Comment',
28 'Data Type' => 'DataType',
29 'Decimal' => 'DecVal',
30 'Float' => 'Float',
31 'Hex' => 'BaseN',
32 'Keyword' => 'Keyword',
33 'Normal Text' => 'Normal',
34 'Octal' => 'BaseN',
35 'Prep. Lib' => 'Others',
36 'Preprocessor' => 'Others',
37 'String' => 'String',
38 'String Char' => 'Char',
39 'Symbol' => 'Normal',
40 });
41 1 $self->listAdd('keywords',
42 'FALSE',
43 'Object',
44 'TRUE',
45 'any',
46 'attribute',
47 'case',
48 'const',
49 'context',
50 'default',
51 'enum',
52 'exception',
53 'fixed',
54 'in',
55 'inout',
56 'interface',
57 'module',
58 'oneway',
59 'out',
60 'public',
61 'raises',
62 'readonly',
63 'sequence',
64 'struct',
65 'switch',
66 'typedef',
67 'union',
68 'unsigned',
69 );
70 1 $self->listAdd('types',
71 'boolean',
72 'char',
73 'double',
74 'float',
75 'long',
76 'octet',
77 'short',
78 'string',
79 'void',
80 'wchar',
81 'wstring',
82 );
83 1 $self->contextdata({
84 'Commentar 1' => {
85 callback => \&parseCommentar1,
86 attribute => 'Comment',
87 lineending => '#pop',
88 },
89 'Commentar 2' => {
90 callback => \&parseCommentar2,
91 attribute => 'Comment',
92 },
93 'Commentar/Preprocessor' => {
94 callback => \&parseCommentarPreprocessor,
95 attribute => 'Comment',
96 },
97 'Normal' => {
98 callback => \&parseNormal,
99 attribute => 'Normal Text',
100 },
101 'Preprocessor' => {
102 callback => \&parsePreprocessor,
103 attribute => 'Preprocessor',
104 lineending => '#pop',
105 },
106 'Some Context' => {
107 callback => \&parseSomeContext,
108 attribute => 'Normal Text',
109 lineending => '#pop',
110 },
111 'Some Context2' => {
112 callback => \&parseSomeContext2,
113 attribute => 'Normal Text',
114 lineending => '#pop',
115 },
116 'Some Context3' => {
117 callback => \&parseSomeContext3,
118 attribute => 'Normal Text',
119 },
120 'String' => {
121 callback => \&parseString,
122 attribute => 'String',
123 },
124 });
125 1 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
126 1 $self->basecontext('Normal');
127 1 $self->keywordscase(0);
128 1 $self->initialize;
129 1 bless ($self, $class);
130 1 return $self;
131 }
132  
133 sub language {
134 0 ▶ return 'IDL';
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
135 }
136  
137 sub parseCommentar1 {
138 0 ▶ my ($self, $text) = @_;
Subroutine parseCommentar1: not called CC=2 SCAR=17.9
Pod undocumented
139 # String => '(FIXME|TODO)'
140 # attribute => 'Alert'
141 # context => '#stay'
142 # type => 'RegExpr'
143 0 ▶ if ($self->testRegExpr($text, '(FIXME|TODO)', 0, 0, 0, undef, 0, '#stay', 'Alert')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "(FIXME|TODO)", 0, 0, 0, undef, 0, "#stay", "Alert")) 0 0 0
144 0 return 1
145 }
146 0 return 0;
147 };
148  
149 sub parseCommentar2 {
150 0 ▶ my ($self, $text) = @_;
Subroutine parseCommentar2: not called CC=3 SCAR=24.8
Pod undocumented
151 # String => '(FIXME|TODO)'
152 # attribute => 'Alert'
153 # context => '#stay'
154 # type => 'RegExpr'
155 0 ▶ if ($self->testRegExpr($text, '(FIXME|TODO)', 0, 0, 0, undef, 0, '#stay', 'Alert')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "(FIXME|TODO)", 0, 0, 0, undef, 0, "#stay", "Alert")) 0 0 0
156 0 return 1
157 }
158 # attribute => 'Comment'
159 # char => '*'
160 # char1 => '/'
161 # context => '#pop'
162 # type => 'Detect2Chars'
163 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
164 0 return 1
165 }
166 0 return 0;
167 };
168  
169 sub parseCommentarPreprocessor {
170 0 ▶ my ($self, $text) = @_;
Subroutine parseCommentarPreprocessor: not called CC=2 SCAR=17.9
Pod undocumented
171 # attribute => 'Comment'
172 # char => '*'
173 # char1 => '/'
174 # context => '#pop'
175 # type => 'Detect2Chars'
176 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
177 0 return 1
178 }
179 0 return 0;
180 };
181  
182 sub parseNormal {
183 0 ▶ my ($self, $text) = @_;
Subroutine parseNormal: not called CC=13 SCAR=52.0
Pod undocumented
184 # String => 'keywords'
185 # attribute => 'Keyword'
186 # context => '#stay'
187 # type => 'keyword'
188 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
189 0 return 1
190 }
191 # String => 'types'
192 # attribute => 'Data Type'
193 # context => '#stay'
194 # type => 'keyword'
195 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
196 0 return 1
197 }
198 # attribute => 'Octal'
199 # context => '#stay'
200 # type => 'HlCOct'
201 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
202 0 return 1
203 }
204 # attribute => 'Hex'
205 # context => '#stay'
206 # type => 'HlCHex'
207 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
208 0 return 1
209 }
210 # attribute => 'Char'
211 # context => '#stay'
212 # type => 'HlCChar'
213 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
214 0 return 1
215 }
216 # attribute => 'String'
217 # char => '"'
218 # context => 'String'
219 # type => 'DetectChar'
220 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
221 0 return 1
222 }
223 # context => '##Doxygen'
224 # type => 'IncludeRules'
225 0 ▶ if ($self->includePlugin('Doxygen', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includePlugin("Doxygen", $text)) 0 0 0
226 0 return 1
227 }
228 # attribute => 'Comment'
229 # char => '/'
230 # char1 => '/'
231 # context => 'Commentar 1'
232 # type => 'Detect2Chars'
233 0 ▶ if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "/", 0, 0, 0, undef, 0, "Commentar 1", "Comment")) 0 0 0
234 0 return 1
235 }
236 # attribute => 'Comment'
237 # char => '/'
238 # char1 => '*'
239 # context => 'Commentar 2'
240 # type => 'Detect2Chars'
241 0 ▶ if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "*", 0, 0, 0, undef, 0, "Commentar 2", "Comment")) 0 0 0
242 0 return 1
243 }
244 # String => '!%&()+,-<=>?[]^{|}~'
245 # attribute => 'Symbol'
246 # context => '#stay'
247 # type => 'AnyChar'
248 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
249 0 return 1
250 }
251 # String => '#if 0'
252 # attribute => 'Comment'
253 # context => 'Some Context3'
254 # insensitive => 'FALSE'
255 # type => 'StringDetect'
256 0 ▶ if ($self->testStringDetect($text, '#if 0', 0, 0, 0, undef, 0, 'Some Context3', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "#if 0", 0, 0, 0, undef, 0, "Some Context3", "Comment")) 0 0 0
257 0 return 1
258 }
259 # attribute => 'Preprocessor'
260 # char => '#'
261 # column => '0'
262 # context => 'Preprocessor'
263 # type => 'DetectChar'
264 0 ▶ if ($self->testDetectChar($text, '#', 0, 0, 0, 0, 0, 'Preprocessor', 'Preprocessor')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "#", 0, 0, 0, 0, 0, "Preprocessor", "Preprocessor")) 0 0 0
265 0 return 1
266 }
267 0 return 0;
268 };
269  
270 sub parsePreprocessor {
271 0 ▶ my ($self, $text) = @_;
Subroutine parsePreprocessor: not called CC=6 SCAR=37.4
Pod undocumented
272 # attribute => 'Preprocessor'
273 # context => 'Some Context2'
274 # type => 'LineContinue'
275 0 ▶ if ($self->testLineContinue($text, 0, undef, 0, 'Some Context2', 'Preprocessor')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testLineContinue($text, 0, undef, 0, "Some Context2", "Preprocessor")) 0 0 0
276 0 return 1
277 }
278 # attribute => 'Prep. Lib'
279 # char => '"'
280 # char1 => '"'
281 # context => '#stay'
282 # type => 'RangeDetect'
283 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
284 0 return 1
285 }
286 # attribute => 'Prep. Lib'
287 # char => '<'
288 # char1 => '>'
289 # context => '#stay'
290 # type => 'RangeDetect'
291 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
292 0 return 1
293 }
294 # attribute => 'Comment'
295 # char => '/'
296 # char1 => '/'
297 # context => 'Commentar 1'
298 # type => 'Detect2Chars'
299 0 ▶ if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "/", 0, 0, 0, undef, 0, "Commentar 1", "Comment")) 0 0 0
300 0 return 1
301 }
302 # attribute => 'Comment'
303 # char => '/'
304 # char1 => '*'
305 # context => 'Commentar/Preprocessor'
306 # type => 'Detect2Chars'
307 0 ▶ if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar/Preprocessor', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "*", 0, 0, 0, undef, 0, "Commentar/Preprocessor", "Comment")) 0 0 0
308 0 return 1
309 }
310 0 return 0;
311 };
312  
313 sub parseSomeContext {
314 0 ▶ my ($self, $text) = @_;
Subroutine parseSomeContext: not called CC=1 SCAR=6.9
Pod undocumented
315 0 return 0;
316 };
317  
318 sub parseSomeContext2 {
319 0 ▶ my ($self, $text) = @_;
Subroutine parseSomeContext2: not called CC=1 SCAR=6.9
Pod undocumented
320 0 return 0;
321 };
322  
323 sub parseSomeContext3 {
324 0 ▶ my ($self, $text) = @_;
Subroutine parseSomeContext3: not called CC=3 SCAR=24.8
Pod undocumented
325 # String => '(FIXME|TODO)'
326 # attribute => 'Alert'
327 # context => '#stay'
328 # type => 'RegExpr'
329 0 ▶ if ($self->testRegExpr($text, '(FIXME|TODO)', 0, 0, 0, undef, 0, '#stay', 'Alert')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "(FIXME|TODO)", 0, 0, 0, undef, 0, "#stay", "Alert")) 0 0 0
330 0 return 1
331 }
332 # String => '#endif'
333 # attribute => 'Comment'
334 # column => '0'
335 # context => '#pop'
336 # type => 'StringDetect'
337 0 ▶ if ($self->testStringDetect($text, '#endif', 0, 0, 0, 0, 0, '#pop', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "#endif", 0, 0, 0, 0, 0, "#pop", "Comment")) 0 0 0
338 0 return 1
339 }
340 0 return 0;
341 };
342  
343 sub parseString {
344 0 ▶ my ($self, $text) = @_;
Subroutine parseString: not called CC=4 SCAR=30.0
Pod undocumented
345 # attribute => 'String'
346 # context => 'Some Context'
347 # type => 'LineContinue'
348 0 ▶ if ($self->testLineContinue($text, 0, undef, 0, 'Some Context', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testLineContinue($text, 0, undef, 0, "Some Context", "String")) 0 0 0
349 0 return 1
350 }
351 # attribute => 'String Char'
352 # context => '#stay'
353 # type => 'HlCStringChar'
354 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
355 0 return 1
356 }
357 # attribute => 'String'
358 # char => '"'
359 # context => '#pop'
360 # type => 'DetectChar'
361 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
362 0 return 1
363 }
364 0 return 0;
365 };
366  
367  
368 1 1;
369  
370 __END__
« Kate/Debian_Control.pm ↑ Summary Kate/ILERPG.pm »