Kate/Python.pm

filter: Statementstmt 56.8% 79 / 139 Branchbran 50.0% 45 / 90 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 50.0% 8 / 16 Podpod 0.0% 0 / 13 totaltotal 50.5% 133 / 263 SCAR 55.7
CC
47
Cov
54%
parseNormal
30.1
parseTrippleAstring
20.0
parseRawAstring
12.0
CRAP 263.7
« Kate/Java.pm ↑ Summary Kate/XML.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 'python.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7  
8 #kate xml version 1.23
9 #kate version 2.4
10 #kate author Per Wigren
11 #generated: Sun Feb 3 22:02:06 2008, localtime
12  
13 package Syntax::Highlight::Engine::Kate::Python;
14  
15 1 our $VERSION = '0.14';
16  
17 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 1 ▶use base('Syntax::Highlight::Engine::Kate::Template');
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 sub new {
22 2 ▶ my $proto = shift;
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
23 2 ▶ my $class = ref($proto) || $proto;
Condition33%1/3
ref $proto || $proto
l!l&&r!l&&!r
020
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
24 2 my $self = $class->SUPER::new(@_);
25 2 $self->attributes({
26 'Builtin Function' => 'DataType',
27 'Comment' => 'Comment',
28 'Complex' => 'Others',
29 'Float' => 'Float',
30 'Hex' => 'Others',
31 'Int' => 'DecVal',
32 'Keyword' => 'Keyword',
33 'Long' => 'Others',
34 'Normal Text' => 'Normal',
35 'Octal' => 'Others',
36 'Operator' => 'Char',
37 'Preprocessor' => 'Char',
38 'Raw String' => 'String',
39 'Special Variable' => 'Others',
40 'String' => 'String',
41 });
42 2 $self->listAdd('builtinfuncs',
43 'abs',
44 'apply',
45 'buffer',
46 'callable',
47 'chr',
48 'cmp',
49 'coerce',
50 'compile',
51 'complex',
52 'copyright',
53 'credits',
54 'delattr',
55 'dir',
56 'divmod',
57 'eval',
58 'execfile',
59 'exit',
60 'filter',
61 'float',
62 'getattr',
63 'globals',
64 'hasattr',
65 'hash',
66 'hex',
67 'id',
68 'input',
69 'int',
70 'intern',
71 'isinstance',
72 'issubclass',
73 'iter',
74 'len',
75 'license',
76 'list',
77 'locals',
78 'long',
79 'map',
80 'max',
81 'min',
82 'oct',
83 'open',
84 'ord',
85 'pow',
86 'quit',
87 'range',
88 'raw_input',
89 'reduce',
90 'reload',
91 'repr',
92 'round',
93 'setattr',
94 'slice',
95 'str',
96 'tuple',
97 'type',
98 'unichr',
99 'unicode',
100 'vars',
101 'xrange',
102 'zip',
103 );
104 2 $self->listAdd('prep',
105 'as',
106 'from',
107 'import',
108 );
109 2 $self->listAdd('specialvars',
110 'Ellipsis',
111 'False',
112 'None',
113 'NotImplemented',
114 'True',
115 'self',
116 );
117 2 $self->listAdd('statements',
118 'and',
119 'assert',
120 'break',
121 'class',
122 'continue',
123 'def',
124 'del',
125 'elif',
126 'else',
127 'except',
128 'exec',
129 'finally',
130 'for',
131 'global',
132 'if',
133 'in',
134 'is',
135 'lambda',
136 'not',
137 'or',
138 'pass',
139 'print',
140 'raise',
141 'return',
142 'try',
143 'while',
144 'yield',
145 );
146 2 $self->contextdata({
147 'Normal' => {
148 callback => \&parseNormal,
149 attribute => 'Normal Text',
150 },
151 'Raw A-string' => {
152 callback => \&parseRawAstring,
153 attribute => 'Raw String',
154 },
155 'Raw Q-string' => {
156 callback => \&parseRawQstring,
157 attribute => 'Raw String',
158 },
159 'Single A-comment' => {
160 callback => \&parseSingleAcomment,
161 attribute => 'Comment',
162 },
163 'Single A-string' => {
164 callback => \&parseSingleAstring,
165 attribute => 'String',
166 },
167 'Single Q-comment' => {
168 callback => \&parseSingleQcomment,
169 attribute => 'Comment',
170 },
171 'Single Q-string' => {
172 callback => \&parseSingleQstring,
173 attribute => 'String',
174 },
175 'Tripple A-comment' => {
176 callback => \&parseTrippleAcomment,
177 attribute => 'Comment',
178 },
179 'Tripple A-string' => {
180 callback => \&parseTrippleAstring,
181 attribute => 'String',
182 },
183 'Tripple Q-comment' => {
184 callback => \&parseTrippleQcomment,
185 attribute => 'Comment',
186 },
187 'Tripple Q-string' => {
188 callback => \&parseTrippleQstring,
189 attribute => 'String',
190 },
191 });
192 2 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
193 2 $self->basecontext('Normal');
194 2 $self->keywordscase(0);
195 2 $self->initialize;
196 2 bless ($self, $class);
197 2 return $self;
198 }
199  
200 sub language {
201 0 ▶ return 'Python';
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
202 }
203  
204 sub parseNormal {
205 2764 ▶ my ($self, $text) = @_;
Subroutine parseNormal: called CC=22 SCAR=34.0
Pod undocumented
206 # String => 'prep'
207 # attribute => 'Preprocessor'
208 # context => '#stay'
209 # type => 'keyword'
210 2764 ▶ if ($self->testKeyword($text, 'prep', 0, undef, 0, '#stay', 'Preprocessor')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "prep", 0, undef, 0, "#stay", "Preprocessor")) 15 2749 2764
211 15 return 1
212 }
213 # String => 'statements'
214 # attribute => 'Keyword'
215 # context => '#stay'
216 # type => 'keyword'
217 2749 ▶ if ($self->testKeyword($text, 'statements', 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "statements", 0, undef, 0, "#stay", "Keyword")) 82 2667 2749
218 82 return 1
219 }
220 # String => 'builtinfuncs'
221 # attribute => 'Builtin Function'
222 # context => '#stay'
223 # type => 'keyword'
224 2667 ▶ if ($self->testKeyword($text, 'builtinfuncs', 0, undef, 0, '#stay', 'Builtin Function')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "builtinfuncs", 0, undef, 0, "#stay", "Builtin Function")) 2 2665 2667
225 2 return 1
226 }
227 # String => 'specialvars'
228 # attribute => 'Special Variable'
229 # context => '#stay'
230 # type => 'keyword'
231 2665 ▶ if ($self->testKeyword($text, 'specialvars', 0, undef, 0, '#stay', 'Special Variable')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "specialvars", 0, undef, 0, "#stay", "Special Variable")) 38 2627 2665
232 38 return 1
233 }
234 # String => '[a-zA-Z_]\w+'
235 # attribute => 'Normal'
236 # context => '#stay'
237 # type => 'RegExpr'
238 2627 ▶ if ($self->testRegExpr($text, '[a-zA-Z_]\\w+', 0, 0, 0, undef, 0, '#stay', 'Normal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[a-zA-Z_]\\w+", 0, 0, 0, undef, 0, "#stay", "Normal")) 473 2154 2627
239 473 return 1
240 }
241 # String => ' (((\d*\.\d+|\d+\.)|(\d+|(\d*\.\d+|\d+\.))[eE][+-]?\d+)|\d+)[jJ]'
242 # attribute => 'Complex'
243 # context => '#stay'
244 # type => 'RegExpr'
245 2154 ▶ if ($self->testRegExpr($text, ' (((\\d*\\.\\d+|\\d+\\.)|(\\d+|(\\d*\\.\\d+|\\d+\\.))[eE][+-]?\\d+)|\\d+)[jJ]', 0, 0, 0, undef, 0, '#stay', 'Complex')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, " (((\\d*\\.\\d+|\\d+\\.)|(\\d+|(\\d*\\.\\d+|\\d+\\.))[eE][+-]?\\d+)|\\d+)[jJ]", 0, 0, 0, undef, 0, "#stay", "Complex")) 0 2154 2154
246 0 return 1
247 }
248 # String => '(\d+\.\d*|\.\d+)([eE]\d+)?'
249 # attribute => 'Float'
250 # context => '#stay'
251 # type => 'RegExpr'
252 2154 ▶ if ($self->testRegExpr($text, '(\\d+\\.\\d*|\\.\\d+)([eE]\\d+)?', 0, 0, 0, undef, 0, '#stay', 'Float')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "(\\d+\\.\\d*|\\.\\d+)([eE]\\d+)?", 0, 0, 0, undef, 0, "#stay", "Float")) 0 2154 2154
253 0 return 1
254 }
255 # String => '([1-9]\d*([eE]\d+)?|0)'
256 # attribute => 'Int'
257 # context => '#stay'
258 # type => 'RegExpr'
259 2154 ▶ if ($self->testRegExpr($text, '([1-9]\\d*([eE]\\d+)?|0)', 0, 0, 0, undef, 0, '#stay', 'Int')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "([1-9]\\d*([eE]\\d+)?|0)", 0, 0, 0, undef, 0, "#stay", "Int")) 12 2142 2154
260 12 return 1
261 }
262 # String => '[1-9]\d*([eE][\d.]+)?[Ll]'
263 # attribute => 'Long'
264 # context => '#stay'
265 # type => 'RegExpr'
266 2142 ▶ if ($self->testRegExpr($text, '[1-9]\\d*([eE][\\d.]+)?[Ll]', 0, 0, 0, undef, 0, '#stay', 'Long')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[1-9]\\d*([eE][\\d.]+)?[Ll]", 0, 0, 0, undef, 0, "#stay", "Long")) 0 2142 2142
267 0 return 1
268 }
269 # String => '0[Xx][\da-fA-F]+'
270 # attribute => 'Hex'
271 # context => '#stay'
272 # type => 'RegExpr'
273 2142 ▶ if ($self->testRegExpr($text, '0[Xx][\\da-fA-F]+', 0, 0, 0, undef, 0, '#stay', 'Hex')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "0[Xx][\\da-fA-F]+", 0, 0, 0, undef, 0, "#stay", "Hex")) 0 2142 2142
274 0 return 1
275 }
276 # String => '0[1-9]\d*'
277 # attribute => 'Octal'
278 # context => '#stay'
279 # type => 'RegExpr'
280 2142 ▶ if ($self->testRegExpr($text, '0[1-9]\\d*', 0, 0, 0, undef, 0, '#stay', 'Octal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "0[1-9]\\d*", 0, 0, 0, undef, 0, "#stay", "Octal")) 0 2142 2142
281 0 return 1
282 }
283 # String => '[rR]''
284 # attribute => 'Raw String'
285 # context => 'Raw A-string'
286 # type => 'RegExpr'
287 2142 ▶ if ($self->testRegExpr($text, '[rR]\'', 0, 0, 0, undef, 0, 'Raw A-string', 'Raw String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[rR]'", 0, 0, 0, undef, 0, "Raw A-string", "Raw String")) 0 2142 2142
288 0 return 1
289 }
290 # String => '[rR]"'
291 # attribute => 'Raw String'
292 # context => 'Raw Q-string'
293 # type => 'RegExpr'
294 2142 ▶ if ($self->testRegExpr($text, '[rR]"', 0, 0, 0, undef, 0, 'Raw Q-string', 'Raw String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[rR]\"", 0, 0, 0, undef, 0, "Raw Q-string", "Raw String")) 0 2142 2142
295 0 return 1
296 }
297 # String => '#.*$'
298 # attribute => 'Comment'
299 # context => '#stay'
300 # type => 'RegExpr'
301 2142 ▶ if ($self->testRegExpr($text, '#.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "#.*\$", 0, 0, 0, undef, 0, "#stay", "Comment")) 0 2142 2142
302 0 return 1
303 }
304 # String => '''''
305 # attribute => 'Comment'
306 # context => 'Tripple A-comment'
307 # firstNonSpace => 'true'
308 # type => 'StringDetect'
309 2142 ▶ if ($self->testStringDetect($text, '\'\'\'', 0, 0, 0, undef, 1, 'Tripple A-comment', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "'''", 0, 0, 0, undef, 1, "Tripple A-comment", "Comment")) 0 2142 2142
310 0 return 1
311 }
312 # String => '"""'
313 # attribute => 'Comment'
314 # context => 'Tripple Q-comment'
315 # firstNonSpace => 'true'
316 # type => 'StringDetect'
317 2142 ▶ if ($self->testStringDetect($text, '"""', 0, 0, 0, undef, 1, 'Tripple Q-comment', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "\"\"\"", 0, 0, 0, undef, 1, "Tripple Q-comment", "Comment")) 0 2142 2142
318 0 return 1
319 }
320 # String => '''''
321 # attribute => 'String'
322 # context => 'Tripple A-string'
323 # type => 'StringDetect'
324 2142 ▶ if ($self->testStringDetect($text, '\'\'\'', 0, 0, 0, undef, 0, 'Tripple A-string', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "'''", 0, 0, 0, undef, 0, "Tripple A-string", "String")) 0 2142 2142
325 0 return 1
326 }
327 # String => '"""'
328 # attribute => 'String'
329 # context => 'Tripple Q-string'
330 # type => 'StringDetect'
331 2142 ▶ if ($self->testStringDetect($text, '"""', 0, 0, 0, undef, 0, 'Tripple Q-string', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "\"\"\"", 0, 0, 0, undef, 0, "Tripple Q-string", "String")) 8 2134 2142
332 8 return 1
333 }
334 # attribute => 'String'
335 # char => '''
336 # context => 'Single A-string'
337 # type => 'DetectChar'
338 2134 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'Single A-string', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "Single A-string", "String")) 14 2120 2134
339 14 return 1
340 }
341 # attribute => 'String'
342 # char => '"'
343 # context => 'Single Q-string'
344 # type => 'DetectChar'
345 2120 ▶ if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'Single Q-string', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\"", 0, 0, 0, undef, 0, "Single Q-string", "String")) 80 2040 2120
346 80 return 1
347 }
348 # String => '[+*/\(\)%\|\[\]\{\}:=;\!<>!^&~-]'
349 # attribute => 'Operator'
350 # context => '#stay'
351 # type => 'RegExpr'
352 2040 ▶ if ($self->testRegExpr($text, '[+*/\\(\\)%\\|\\[\\]\\{\\}:=;\\!<>!^&~-]', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[+*/\\(\\)%\\|\\[\\]\\{\\}:=;\\!<>!^&~-]", 0, 0, 0, undef, 0, "#stay", "Operator")) 290 1750 2040
353 290 return 1
354 }
355 1750 return 0;
356 };
357  
358 sub parseRawAstring {
359 0 ▶ my ($self, $text) = @_;
Subroutine parseRawAstring: not called CC=3 SCAR=24.8
Pod undocumented
360 # attribute => 'Raw String'
361 # context => '#stay'
362 # type => 'HlCStringChar'
363 0 ▶ if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'Raw String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCStringChar($text, 0, undef, 0, "#stay", "Raw String")) 0 0 0
364 0 return 1
365 }
366 # attribute => 'Raw String'
367 # char => '''
368 # context => '#pop'
369 # type => 'DetectChar'
370 0 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'Raw String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "#pop", "Raw String")) 0 0 0
371 0 return 1
372 }
373 0 return 0;
374 };
375  
376 sub parseRawQstring {
377 0 ▶ my ($self, $text) = @_;
Subroutine parseRawQstring: not called CC=3 SCAR=24.8
Pod undocumented
378 # attribute => 'Raw String'
379 # context => '#stay'
380 # type => 'HlCStringChar'
381 0 ▶ if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'Raw String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCStringChar($text, 0, undef, 0, "#stay", "Raw String")) 0 0 0
382 0 return 1
383 }
384 # attribute => 'Raw String'
385 # char => '"'
386 # context => '#pop'
387 # type => 'DetectChar'
388 0 ▶ if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'Raw String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\"", 0, 0, 0, undef, 0, "#pop", "Raw String")) 0 0 0
389 0 return 1
390 }
391 0 return 0;
392 };
393  
394 sub parseSingleAcomment {
395 0 ▶ my ($self, $text) = @_;
Subroutine parseSingleAcomment: not called CC=3 SCAR=24.8
Pod undocumented
396 # attribute => 'Comment'
397 # context => '#stay'
398 # type => 'HlCStringChar'
399 0 ▶ if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCStringChar($text, 0, undef, 0, "#stay", "Comment")) 0 0 0
400 0 return 1
401 }
402 # attribute => 'Comment'
403 # char => '''
404 # context => '#pop'
405 # type => 'DetectChar'
406 0 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "#pop", "Comment")) 0 0 0
407 0 return 1
408 }
409 0 return 0;
410 };
411  
412 sub parseSingleAstring {
413 192 ▶ my ($self, $text) = @_;
Subroutine parseSingleAstring: called CC=4 SCAR=14.0
Pod undocumented
414 # attribute => 'String'
415 # context => '#stay'
416 # type => 'HlCStringChar'
417 192 ▶ if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCStringChar($text, 0, undef, 0, "#stay", "String")) 2 190 192
418 2 return 1
419 }
420 # String => '%[a-zA-Z]'
421 # attribute => 'Operator'
422 # context => '#stay'
423 # type => 'RegExpr'
424 190 ▶ if ($self->testRegExpr($text, '%[a-zA-Z]', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "%[a-zA-Z]", 0, 0, 0, undef, 0, "#stay", "Operator")) 0 190 190
425 0 return 1
426 }
427 # attribute => 'String'
428 # char => '''
429 # context => '#pop'
430 # type => 'DetectChar'
431 190 ▶ 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")) 14 176 190
432 14 return 1
433 }
434 176 return 0;
435 };
436  
437 sub parseSingleQcomment {
438 0 ▶ my ($self, $text) = @_;
Subroutine parseSingleQcomment: not called CC=3 SCAR=24.8
Pod undocumented
439 # attribute => 'Comment'
440 # context => '#stay'
441 # type => 'HlCStringChar'
442 0 ▶ if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCStringChar($text, 0, undef, 0, "#stay", "Comment")) 0 0 0
443 0 return 1
444 }
445 # attribute => 'Comment'
446 # char => '"'
447 # context => '#pop'
448 # type => 'DetectChar'
449 0 ▶ if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\"", 0, 0, 0, undef, 0, "#pop", "Comment")) 0 0 0
450 0 return 1
451 }
452 0 return 0;
453 };
454  
455 sub parseSingleQstring {
456 1318 ▶ my ($self, $text) = @_;
Subroutine parseSingleQstring: called CC=4 SCAR=14.0
Pod undocumented
457 # attribute => 'String'
458 # context => '#stay'
459 # type => 'HlCStringChar'
460 1318 ▶ if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCStringChar($text, 0, undef, 0, "#stay", "String")) 4 1314 1318
461 4 return 1
462 }
463 # String => '%[a-zA-Z]'
464 # attribute => 'Operator'
465 # context => '#stay'
466 # type => 'RegExpr'
467 1314 ▶ if ($self->testRegExpr($text, '%[a-zA-Z]', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "%[a-zA-Z]", 0, 0, 0, undef, 0, "#stay", "Operator")) 0 1314 1314
468 0 return 1
469 }
470 # attribute => 'String'
471 # char => '"'
472 # context => '#pop'
473 # type => 'DetectChar'
474 1314 ▶ 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")) 80 1234 1314
475 80 return 1
476 }
477 1234 return 0;
478 };
479  
480 sub parseTrippleAcomment {
481 0 ▶ my ($self, $text) = @_;
Subroutine parseTrippleAcomment: not called CC=3 SCAR=24.8
Pod undocumented
482 # attribute => 'Comment'
483 # context => '#stay'
484 # type => 'HlCChar'
485 0 ▶ if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCChar($text, 0, undef, 0, "#stay", "Comment")) 0 0 0
486 0 return 1
487 }
488 # String => '''''
489 # attribute => 'Comment'
490 # context => '#pop'
491 # type => 'StringDetect'
492 0 ▶ if ($self->testStringDetect($text, '\'\'\'', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "'''", 0, 0, 0, undef, 0, "#pop", "Comment")) 0 0 0
493 0 return 1
494 }
495 0 return 0;
496 };
497  
498 sub parseTrippleAstring {
499 0 ▶ my ($self, $text) = @_;
Subroutine parseTrippleAstring: not called CC=4 SCAR=30.0
Pod undocumented
500 # attribute => 'String'
501 # context => '#stay'
502 # type => 'HlCChar'
503 0 ▶ if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCChar($text, 0, undef, 0, "#stay", "String")) 0 0 0
504 0 return 1
505 }
506 # String => '%[a-zA-Z]'
507 # attribute => 'Operator'
508 # context => '#stay'
509 # type => 'RegExpr'
510 0 ▶ if ($self->testRegExpr($text, '%[a-zA-Z]', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "%[a-zA-Z]", 0, 0, 0, undef, 0, "#stay", "Operator")) 0 0 0
511 0 return 1
512 }
513 # String => '''''
514 # attribute => 'String'
515 # context => '#pop'
516 # type => 'StringDetect'
517 0 ▶ if ($self->testStringDetect($text, '\'\'\'', 0, 0, 0, undef, 0, '#pop', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "'''", 0, 0, 0, undef, 0, "#pop", "String")) 0 0 0
518 0 return 1
519 }
520 0 return 0;
521 };
522  
523 sub parseTrippleQcomment {
524 0 ▶ my ($self, $text) = @_;
Subroutine parseTrippleQcomment: not called CC=3 SCAR=24.8
Pod undocumented
525 # attribute => 'Comment'
526 # context => '#stay'
527 # type => 'HlCChar'
528 0 ▶ if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCChar($text, 0, undef, 0, "#stay", "Comment")) 0 0 0
529 0 return 1
530 }
531 # String => '"""'
532 # attribute => 'Comment'
533 # context => '#pop'
534 # type => 'StringDetect'
535 0 ▶ if ($self->testStringDetect($text, '"""', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "\"\"\"", 0, 0, 0, undef, 0, "#pop", "Comment")) 0 0 0
536 0 return 1
537 }
538 0 return 0;
539 };
540  
541 sub parseTrippleQstring {
542 738 ▶ my ($self, $text) = @_;
Subroutine parseTrippleQstring: called CC=4 SCAR=14.8
Pod undocumented
543 # attribute => 'String'
544 # context => '#stay'
545 # type => 'HlCStringChar'
546 738 ▶ if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCStringChar($text, 0, undef, 0, "#stay", "String")) 0 738 738
547 0 return 1
548 }
549 # String => '%[a-zA-Z]'
550 # attribute => 'Operator'
551 # context => '#stay'
552 # type => 'RegExpr'
553 738 ▶ if ($self->testRegExpr($text, '%[a-zA-Z]', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "%[a-zA-Z]", 0, 0, 0, undef, 0, "#stay", "Operator")) 0 738 738
554 0 return 1
555 }
556 # String => '"""'
557 # attribute => 'String'
558 # context => '#pop'
559 # type => 'StringDetect'
560 738 ▶ if ($self->testStringDetect($text, '"""', 0, 0, 0, undef, 0, '#pop', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "\"\"\"", 0, 0, 0, undef, 0, "#pop", "String")) 8 730 738
561 8 return 1
562 }
563 730 return 0;
564 };
565  
566  
567 1 1;
568  
569 __END__
« Kate/Java.pm ↑ Summary Kate/XML.pm »