Kate/Scheme.pm

filter: Statementstmt 89.5% 128 / 143 Branchbran 84.7% 78 / 92 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 94.1% 16 / 17 Podpod 0.0% 0 / 14 totaltotal 82.2% 223 / 271 SCAR 39.7
CC
48
Cov
87%
parseDefault
17.9
parseSpecialNumber
7.2
parseString
6.2
CRAP 53.1
« Kate/GNU_Gettext.pm ↑ Summary Kate/R_Script.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 'scheme.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7  
8 #kate xml version 1.11
9 #kate version 2.4
10 #kate author Dominik Haumann (dhdev@gmx.de)
11 #generated: Sun Feb 3 22:02:06 2008, localtime
12  
13 package Syntax::Highlight::Engine::Kate::Scheme;
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 'BaseN' => 'BaseN',
27 'Brackets1' => 'Others',
28 'Brackets2' => 'Others',
29 'Brackets3' => 'Others',
30 'Brackets4' => 'Others',
31 'Brackets5' => 'Others',
32 'Brackets6' => 'Others',
33 'Char' => 'Char',
34 'Comment' => 'Comment',
35 'Data' => 'DataType',
36 'Decimal' => 'DecVal',
37 'Definition' => 'Reserved',
38 'Float' => 'Float',
39 'Function' => 'Function',
40 'Keyword' => 'Keyword',
41 'Normal' => 'Normal',
42 'Operator' => 'Operator',
43 'Region Marker' => 'RegionMarker',
44 'String' => 'String',
45 });
46 2 $self->listAdd('characters',
47 '#\\\\ack',
48 '#\\\\backspace',
49 '#\\\\bel',
50 '#\\\\bs',
51 '#\\\\bs',
52 '#\\\\can',
53 '#\\\\cr',
54 '#\\\\cr',
55 '#\\\\dc1',
56 '#\\\\dc2',
57 '#\\\\dc3',
58 '#\\\\dc4',
59 '#\\\\dle',
60 '#\\\\em',
61 '#\\\\enq',
62 '#\\\\eot',
63 '#\\\\esc',
64 '#\\\\etb',
65 '#\\\\etx',
66 '#\\\\fs',
67 '#\\\\gs',
68 '#\\\\ht',
69 '#\\\\ht',
70 '#\\\\nak',
71 '#\\\\newline',
72 '#\\\\nl',
73 '#\\\\nl',
74 '#\\\\np',
75 '#\\\\np',
76 '#\\\\nul',
77 '#\\\\nul',
78 '#\\\\null',
79 '#\\\\page',
80 '#\\\\return',
81 '#\\\\rs',
82 '#\\\\si',
83 '#\\\\so',
84 '#\\\\soh',
85 '#\\\\sp',
86 '#\\\\space',
87 '#\\\\stx',
88 '#\\\\sub',
89 '#\\\\syn',
90 '#\\\\tab',
91 '#\\\\us',
92 '#\\\\vt',
93 );
94 2 $self->listAdd('defines',
95 'define',
96 'define*',
97 'define*-public',
98 'define-accessor',
99 'define-class',
100 'define-generic',
101 'define-macro',
102 'define-method',
103 'define-module',
104 'define-private',
105 'define-public',
106 'define-reader-ctor',
107 'define-syntax',
108 'define-syntax-macro',
109 'defined?',
110 'defmacro',
111 'defmacro*',
112 'defmacro*-public',
113 );
114 2 $self->listAdd('keywords',
115 'abs',
116 'acos',
117 'and',
118 'angle',
119 'append',
120 'applymap',
121 'asin',
122 'assoc',
123 'assq',
124 'assv',
125 'atan',
126 'begin',
127 'boolean?',
128 'break',
129 'caaaar',
130 'caaadr',
131 'caaar',
132 'caadar',
133 'caaddr',
134 'caadr',
135 'caar',
136 'cadaar',
137 'cadadr',
138 'cadar',
139 'caddar',
140 'cadddr',
141 'caddr',
142 'cadr',
143 'call-with-current-continuation',
144 'call-with-input-file',
145 'call-with-output-file',
146 'call-with-values',
147 'call/cc',
148 'car',
149 'case',
150 'catch',
151 'cdaaar',
152 'cdaadr',
153 'cdaar',
154 'cdadar',
155 'cdaddr',
156 'cdadr',
157 'cdar',
158 'cddaar',
159 'cddadr',
160 'cddar',
161 'cdddar',
162 'cddddr',
163 'cdddr',
164 'cddr',
165 'cdr',
166 'ceiling',
167 'char->integer',
168 'char-alphabetic?',
169 'char-ci<=?',
170 'char-ci=?',
171 'char-ci>=?',
172 'char-ci>?',
173 'char-downcase',
174 'char-lower-case?',
175 'char-numeric?',
176 'char-ready?',
177 'char-upcase',
178 'char-upper-case?',
179 'char-whitespace?',
180 'char<=?',
181 'char<?c',
182 'char=?',
183 'char>=?',
184 'char>?',
185 'char?',
186 'close-input-port',
187 'close-output-port',
188 'complex?',
189 'cond',
190 'cons',
191 'continue',
192 'cos',
193 'current-input-port',
194 'current-output-port',
195 'denominator',
196 'display',
197 'do',
198 'dynamic-wind',
199 'else',
200 'eof-object?',
201 'eq?',
202 'equal?',
203 'eqv?',
204 'eval',
205 'even?',
206 'exact->inexact',
207 'exact?',
208 'exp',
209 'expt',
210 'floor',
211 'for-each',
212 'force',
213 'gcd',
214 'har-ci<?',
215 'if',
216 'imag-part',
217 'inexact->exact',
218 'inexact?',
219 'input-port?',
220 'integer->char',
221 'integer?',
222 'interaction-environment',
223 'lambda',
224 'lcm',
225 'length',
226 'let',
227 'let*',
228 'let-syntax',
229 'letrec',
230 'letrec-syntax',
231 'list',
232 'list->string',
233 'list-ref',
234 'list-tail',
235 'list?',
236 'load',
237 'log',
238 'magnitude',
239 'make-polar',
240 'make-rectangular',
241 'make-string',
242 'make-vector',
243 'max',
244 'member',
245 'memq',
246 'memv',
247 'min',
248 'modulo',
249 'negative?',
250 'newline',
251 'not',
252 'null-environment',
253 'null?',
254 'number->string',
255 'number?',
256 'numerator',
257 'odd?',
258 'open-input-file',
259 'open-output-file',
260 'or',
261 'output-port?',
262 'pair?',
263 'peek-char',
264 'port?',
265 'positive?',
266 'procedure?',
267 'quotient',
268 'rational?',
269 'rationalize',
270 'read',
271 'read-char',
272 'real-part',
273 'real?',
274 'remainder',
275 'reverse',
276 'round',
277 'scheme-report-environment',
278 'set-car!',
279 'set-cdr!',
280 'sin',
281 'sqrt',
282 'string',
283 'string->list',
284 'string->number',
285 'string->symbol',
286 'string-append',
287 'string-ci<=?',
288 'string-ci<?',
289 'string-ci=?',
290 'string-ci>=?',
291 'string-ci>?',
292 'string-copy',
293 'string-fill!',
294 'string-length',
295 'string-ref',
296 'string-set!',
297 'string<=?',
298 'string<?',
299 'string=?',
300 'string>=?',
301 'string>?',
302 'string?',
303 'substring',
304 'symbol->string',
305 'symbol?',
306 'syntax-rules',
307 'tan',
308 'transcript-off',
309 'transcript-on',
310 'truncate',
311 'values',
312 'vector',
313 'vector->listlist->vector',
314 'vector-fill!',
315 'vector-length',
316 'vector-ref',
317 'vector-set!',
318 'vector?',
319 'while',
320 'with-input-from-file',
321 'with-output-to-file',
322 'write',
323 'write-char',
324 'zero?',
325 );
326 2 $self->listAdd('operators',
327 '*)',
328 '*,*',
329 '+',
330 '-',
331 '/',
332 '<',
333 '<=',
334 '=',
335 '=>',
336 '>',
337 '>=',
338 );
339 2 $self->contextdata({
340 'Default' => {
341 callback => \&parseDefault,
342 attribute => 'Normal',
343 },
344 'Level0' => {
345 callback => \&parseLevel0,
346 attribute => 'Normal',
347 },
348 'Level1' => {
349 callback => \&parseLevel1,
350 attribute => 'Normal',
351 },
352 'Level2' => {
353 callback => \&parseLevel2,
354 attribute => 'Normal',
355 },
356 'Level3' => {
357 callback => \&parseLevel3,
358 attribute => 'Normal',
359 },
360 'Level4' => {
361 callback => \&parseLevel4,
362 attribute => 'Normal',
363 },
364 'Level5' => {
365 callback => \&parseLevel5,
366 attribute => 'Normal',
367 },
368 'Level6' => {
369 callback => \&parseLevel6,
370 attribute => 'Normal',
371 },
372 'MultiLineComment' => {
373 callback => \&parseMultiLineComment,
374 attribute => 'Comment',
375 },
376 'SpecialNumber' => {
377 callback => \&parseSpecialNumber,
378 attribute => 'Normal',
379 lineending => '#pop',
380 },
381 'String' => {
382 callback => \&parseString,
383 attribute => 'String',
384 },
385 'function_decl' => {
386 callback => \&parsefunction_decl,
387 attribute => 'Function',
388 },
389 });
390 2 $self->deliminators('\\s||\\.|\\(|\\)|,|\\%|\\&|;|\\[|\\]|\\^|\\{|\\||\\}|\\~|-|\\+|\\*|\\?|\\!|<|>|=|\\/|:|#|\\\\');
391 2 $self->basecontext('Level0');
392 2 $self->keywordscase(0);
393 2 $self->initialize;
394 2 bless ($self, $class);
395 2 return $self;
396 }
397  
398 sub language {
399 0 ▶ return 'Scheme';
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
400 }
401  
402 sub parseDefault {
403 5740 ▶ my ($self, $text) = @_;
Subroutine parseDefault: called CC=16 SCAR=28.8
Pod undocumented
404 # String => ';+\s*BEGIN.*$'
405 # attribute => 'Region Marker'
406 # beginRegion => 'region'
407 # context => '#stay'
408 # type => 'RegExpr'
409 5740 ▶ if ($self->testRegExpr($text, ';+\\s*BEGIN.*$', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, ";+\\s*BEGIN.*\$", 0, 0, 0, undef, 0, "#stay", "Region Marker")) 0 5740 5740
410 0 return 1
411 }
412 # String => ';+\s*END.*$'
413 # attribute => 'Region Marker'
414 # context => '#stay'
415 # endRegion => 'region'
416 # type => 'RegExpr'
417 5740 ▶ if ($self->testRegExpr($text, ';+\\s*END.*$', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, ";+\\s*END.*\$", 0, 0, 0, undef, 0, "#stay", "Region Marker")) 0 5740 5740
418 0 return 1
419 }
420 # String => ';.*$'
421 # attribute => 'Comment'
422 # context => '#stay'
423 # type => 'RegExpr'
424 5740 ▶ 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 5740 5740
425 0 return 1
426 }
427 # attribute => 'Comment'
428 # beginRegion => 'region'
429 # char => '#'
430 # char1 => '!'
431 # context => 'MultiLineComment'
432 # type => 'Detect2Chars'
433 5740 ▶ 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")) 2 5738 5740
434 2 return 1
435 }
436 # String => 'keywords'
437 # attribute => 'Keyword'
438 # context => '#stay'
439 # type => 'keyword'
440 5738 ▶ if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "keywords", 0, undef, 0, "#stay", "Keyword")) 114 5624 5738
441 114 return 1
442 }
443 # String => 'operators'
444 # attribute => 'Operator'
445 # context => '#stay'
446 # type => 'keyword'
447 5624 ▶ if ($self->testKeyword($text, 'operators', 0, undef, 0, '#stay', 'Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "operators", 0, undef, 0, "#stay", "Operator")) 2 5622 5624
448 2 return 1
449 }
450 # String => 'defines'
451 # attribute => 'Definition'
452 # context => 'function_decl'
453 # type => 'keyword'
454 5622 ▶ if ($self->testKeyword($text, 'defines', 0, undef, 0, 'function_decl', 'Definition')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "defines", 0, undef, 0, "function_decl", "Definition")) 36 5586 5622
455 36 return 1
456 }
457 # String => 'characters'
458 # attribute => 'Char'
459 # context => '#stay'
460 # type => 'keyword'
461 5586 ▶ if ($self->testKeyword($text, 'characters', 0, undef, 0, '#stay', 'Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "characters", 0, undef, 0, "#stay", "Char")) 0 5586 5586
462 0 return 1
463 }
464 # String => '#\\.'
465 # attribute => 'Char'
466 # context => '#stay'
467 # type => 'RegExpr'
468 5586 ▶ if ($self->testRegExpr($text, '#\\\\.', 0, 0, 0, undef, 0, '#stay', 'Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "#\\\\.", 0, 0, 0, undef, 0, "#stay", "Char")) 30 5556 5586
469 30 return 1
470 }
471 # attribute => 'String'
472 # char => '"'
473 # context => 'String'
474 # type => 'DetectChar'
475 5556 ▶ 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")) 10 5546 5556
476 10 return 1
477 }
478 # String => '#[bodxei]'
479 # attribute => 'Char'
480 # context => 'SpecialNumber'
481 # type => 'RegExpr'
482 5546 ▶ if ($self->testRegExpr($text, '#[bodxei]', 0, 0, 0, undef, 0, 'SpecialNumber', 'Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "#[bodxei]", 0, 0, 0, undef, 0, "SpecialNumber", "Char")) 6 5540 5546
483 6 return 1
484 }
485 # String => '#[tf]'
486 # attribute => 'Decimal'
487 # context => '#stay'
488 # type => 'RegExpr'
489 5540 ▶ if ($self->testRegExpr($text, '#[tf]', 0, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "#[tf]", 0, 0, 0, undef, 0, "#stay", "Decimal")) 12 5528 5540
490 12 return 1
491 }
492 # attribute => 'Float'
493 # context => '#stay'
494 # type => 'Float'
495 5528 ▶ if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testFloat($text, 0, undef, 0, "#stay", "Float")) 80 5448 5528
496 80 return 1
497 }
498 # attribute => 'Decimal'
499 # context => '#stay'
500 # type => 'Int'
501 5448 ▶ if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testInt($text, 0, undef, 0, "#stay", "Decimal")) 0 5448 5448
502 0 return 1
503 }
504 # attribute => 'Brackets1'
505 # char => '('
506 # context => 'Level1'
507 # type => 'DetectChar'
508 5448 ▶ if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'Level1', 'Brackets1')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "(", 0, 0, 0, undef, 0, "Level1", "Brackets1")) 0 5448 5448
509 0 return 1
510 }
511 5448 return 0;
512 };
513  
514 sub parseLevel0 {
515 2260 ▶ my ($self, $text) = @_;
Subroutine parseLevel0: called CC=3 SCAR=11.0
Pod undocumented
516 # attribute => 'Brackets1'
517 # char => '('
518 # context => 'Level1'
519 # type => 'DetectChar'
520 2260 ▶ if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'Level1', 'Brackets1')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "(", 0, 0, 0, undef, 0, "Level1", "Brackets1")) 72 2188 2260
521 72 return 1
522 }
523 # context => 'Default'
524 # type => 'IncludeRules'
525 2188 ▶ if ($self->includeRules('Default', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("Default", $text)) 58 2130 2188
526 58 return 1
527 }
528 2130 return 0;
529 };
530  
531 sub parseLevel1 {
532 1152 ▶ my ($self, $text) = @_;
Subroutine parseLevel1: called CC=4 SCAR=13.9
Pod undocumented
533 # attribute => 'Brackets2'
534 # char => '('
535 # context => 'Level2'
536 # type => 'DetectChar'
537 1152 ▶ if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'Level2', 'Brackets2')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "(", 0, 0, 0, undef, 0, "Level2", "Brackets2")) 82 1070 1152
538 82 return 1
539 }
540 # attribute => 'Brackets1'
541 # char => ')'
542 # context => '#pop'
543 # type => 'DetectChar'
544 1070 ▶ if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Brackets1')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ")", 0, 0, 0, undef, 0, "#pop", "Brackets1")) 76 994 1070
545 76 return 1
546 }
547 # context => 'Default'
548 # type => 'IncludeRules'
549 994 ▶ if ($self->includeRules('Default', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("Default", $text)) 82 912 994
550 82 return 1
551 }
552 912 return 0;
553 };
554  
555 sub parseLevel2 {
556 1012 ▶ my ($self, $text) = @_;
Subroutine parseLevel2: called CC=4 SCAR=13.9
Pod undocumented
557 # attribute => 'Brackets3'
558 # char => '('
559 # context => 'Level3'
560 # type => 'DetectChar'
561 1012 ▶ if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'Level3', 'Brackets3')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "(", 0, 0, 0, undef, 0, "Level3", "Brackets3")) 94 918 1012
562 94 return 1
563 }
564 # attribute => 'Brackets2'
565 # char => ')'
566 # context => '#pop'
567 # type => 'DetectChar'
568 918 ▶ if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Brackets2')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ")", 0, 0, 0, undef, 0, "#pop", "Brackets2")) 82 836 918
569 82 return 1
570 }
571 # context => 'Default'
572 # type => 'IncludeRules'
573 836 ▶ if ($self->includeRules('Default', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("Default", $text)) 44 792 836
574 44 return 1
575 }
576 792 return 0;
577 };
578  
579 sub parseLevel3 {
580 796 ▶ my ($self, $text) = @_;
Subroutine parseLevel3: called CC=4 SCAR=13.9
Pod undocumented
581 # attribute => 'Brackets4'
582 # char => '('
583 # context => 'Level4'
584 # type => 'DetectChar'
585 796 ▶ if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'Level4', 'Brackets4')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "(", 0, 0, 0, undef, 0, "Level4", "Brackets4")) 42 754 796
586 42 return 1
587 }
588 # attribute => 'Brackets3'
589 # char => ')'
590 # context => '#pop'
591 # type => 'DetectChar'
592 754 ▶ if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Brackets3')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ")", 0, 0, 0, undef, 0, "#pop", "Brackets3")) 94 660 754
593 94 return 1
594 }
595 # context => 'Default'
596 # type => 'IncludeRules'
597 660 ▶ if ($self->includeRules('Default', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("Default", $text)) 50 610 660
598 50 return 1
599 }
600 610 return 0;
601 };
602  
603 sub parseLevel4 {
604 456 ▶ my ($self, $text) = @_;
Subroutine parseLevel4: called CC=4 SCAR=13.9
Pod undocumented
605 # attribute => 'Brackets5'
606 # char => '('
607 # context => 'Level5'
608 # type => 'DetectChar'
609 456 ▶ if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'Level5', 'Brackets5')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "(", 0, 0, 0, undef, 0, "Level5", "Brackets5")) 24 432 456
610 24 return 1
611 }
612 # attribute => 'Brackets4'
613 # char => ')'
614 # context => '#pop'
615 # type => 'DetectChar'
616 432 ▶ if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Brackets4')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ")", 0, 0, 0, undef, 0, "#pop", "Brackets4")) 42 390 432
617 42 return 1
618 }
619 # context => 'Default'
620 # type => 'IncludeRules'
621 390 ▶ if ($self->includeRules('Default', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("Default", $text)) 42 348 390
622 42 return 1
623 }
624 348 return 0;
625 };
626  
627 sub parseLevel5 {
628 484 ▶ my ($self, $text) = @_;
Subroutine parseLevel5: called CC=4 SCAR=13.9
Pod undocumented
629 # attribute => 'Brackets6'
630 # char => '('
631 # context => 'Level6'
632 # type => 'DetectChar'
633 484 ▶ if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'Level6', 'Brackets6')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "(", 0, 0, 0, undef, 0, "Level6", "Brackets6")) 10 474 484
634 10 return 1
635 }
636 # attribute => 'Brackets5'
637 # char => ')'
638 # context => '#pop'
639 # type => 'DetectChar'
640 474 ▶ if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Brackets5')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ")", 0, 0, 0, undef, 0, "#pop", "Brackets5")) 24 450 474
641 24 return 1
642 }
643 # context => 'Default'
644 # type => 'IncludeRules'
645 450 ▶ if ($self->includeRules('Default', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("Default", $text)) 10 440 450
646 10 return 1
647 }
648 440 return 0;
649 };
650  
651 sub parseLevel6 {
652 236 ▶ my ($self, $text) = @_;
Subroutine parseLevel6: called CC=4 SCAR=13.9
Pod undocumented
653 # attribute => 'Brackets1'
654 # char => '('
655 # context => 'Level1'
656 # type => 'DetectChar'
657 236 ▶ if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'Level1', 'Brackets1')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "(", 0, 0, 0, undef, 0, "Level1", "Brackets1")) 4 232 236
658 4 return 1
659 }
660 # attribute => 'Brackets6'
661 # char => ')'
662 # context => '#pop'
663 # type => 'DetectChar'
664 232 ▶ if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Brackets6')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ")", 0, 0, 0, undef, 0, "#pop", "Brackets6")) 10 222 232
665 10 return 1
666 }
667 # context => 'Default'
668 # type => 'IncludeRules'
669 222 ▶ if ($self->includeRules('Default', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("Default", $text)) 6 216 222
670 6 return 1
671 }
672 216 return 0;
673 };
674  
675 sub parseMultiLineComment {
676 894 ▶ my ($self, $text) = @_;
Subroutine parseMultiLineComment: called CC=2 SCAR=7.6
Pod undocumented
677 # String => '!#\s*$'
678 # attribute => 'Comment'
679 # column => '0'
680 # context => '#pop'
681 # endRegion => 'region'
682 # type => 'RegExpr'
683 894 ▶ if ($self->testRegExpr($text, '!#\\s*$', 0, 0, 0, 0, 0, '#pop', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "!#\\s*\$", 0, 0, 0, 0, 0, "#pop", "Comment")) 0 894 894
684 0 return 1
685 }
686 894 return 0;
687 };
688  
689 sub parseSpecialNumber {
690 244 ▶ my ($self, $text) = @_;
Subroutine parseSpecialNumber: called CC=5 SCAR=19.7
Pod undocumented
691 # attribute => 'Float'
692 # context => '#pop'
693 # type => 'Float'
694 244 ▶ if ($self->testFloat($text, 0, undef, 0, '#pop', 'Float')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testFloat($text, 0, undef, 0, "#pop", "Float")) 0 244 244
695 0 return 1
696 }
697 # attribute => 'Decimal'
698 # context => '#pop'
699 # type => 'Int'
700 244 ▶ if ($self->testInt($text, 0, undef, 0, '#pop', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testInt($text, 0, undef, 0, "#pop", "Decimal")) 0 244 244
701 0 return 1
702 }
703 # attribute => 'BaseN'
704 # context => '#pop'
705 # type => 'HlCOct'
706 244 ▶ if ($self->testHlCOct($text, 0, undef, 0, '#pop', 'BaseN')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCOct($text, 0, undef, 0, "#pop", "BaseN")) 0 244 244
707 0 return 1
708 }
709 # attribute => 'Float'
710 # context => '#pop'
711 # type => 'HlCHex'
712 244 ▶ if ($self->testHlCHex($text, 0, undef, 0, '#pop', 'Float')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCHex($text, 0, undef, 0, "#pop", "Float")) 0 244 244
713 0 return 1
714 }
715 244 return 0;
716 };
717  
718 sub parseString {
719 272 ▶ my ($self, $text) = @_;
Subroutine parseString: called CC=6 SCAR=18.3
Pod undocumented
720 # String => 'characters'
721 # attribute => 'Char'
722 # context => '#stay'
723 # type => 'keyword'
724 272 ▶ if ($self->testKeyword($text, 'characters', 0, undef, 0, '#stay', 'Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "characters", 0, undef, 0, "#stay", "Char")) 0 272 272
725 0 return 1
726 }
727 # String => '#\\.'
728 # attribute => 'Char'
729 # context => '#stay'
730 # type => 'RegExpr'
731 272 ▶ if ($self->testRegExpr($text, '#\\\\.', 0, 0, 0, undef, 0, '#stay', 'Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "#\\\\.", 0, 0, 0, undef, 0, "#stay", "Char")) 0 272 272
732 0 return 1
733 }
734 # attribute => 'Char'
735 # char => '\'
736 # char1 => '"'
737 # context => '#stay'
738 # type => 'Detect2Chars'
739 272 ▶ if ($self->testDetect2Chars($text, '\\', '"', 0, 0, 0, undef, 0, '#stay', 'Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "\\", "\"", 0, 0, 0, undef, 0, "#stay", "Char")) 4 268 272
740 4 return 1
741 }
742 # attribute => 'Char'
743 # char => '\'
744 # char1 => '\'
745 # context => '#stay'
746 # type => 'Detect2Chars'
747 268 ▶ if ($self->testDetect2Chars($text, '\\', '\\', 0, 0, 0, undef, 0, '#stay', 'Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "\\", "\\", 0, 0, 0, undef, 0, "#stay", "Char")) 2 266 268
748 2 return 1
749 }
750 # attribute => 'String'
751 # char => '"'
752 # context => '#pop'
753 # type => 'DetectChar'
754 266 ▶ 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")) 10 256 266
755 10 return 1
756 }
757 256 return 0;
758 };
759  
760 sub parsefunction_decl {
761 36 ▶ my ($self, $text) = @_;
Subroutine parsefunction_decl: called CC=2 SCAR=7.6
Pod undocumented
762 # String => '\s*[A-Za-z0-9-+\<\>//\*]*\s*'
763 # attribute => 'Function'
764 # context => '#pop'
765 # type => 'RegExpr'
766 36 ▶ if ($self->testRegExpr($text, '\\s*[A-Za-z0-9-+\\<\\>//\\*]*\\s*', 0, 0, 0, undef, 0, '#pop', 'Function')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\s*[A-Za-z0-9-+\\<\\>//\\*]*\\s*", 0, 0, 0, undef, 0, "#pop", "Function")) 36 0 36
767 36 return 1
768 }
769 0 return 0;
770 };
771  
772  
773 1 1;
774  
775 __END__
« Kate/GNU_Gettext.pm ↑ Summary Kate/R_Script.pm »