Kate/JavaScript_PHP.pm

filter: Statementstmt 15.6% 28 / 179 Branchbran 0.0% 0 / 126 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 23.5% 4 / 17 Podpod 0.0% 0 / 14 totaltotal 9.6% 33 / 341 SCAR 80.7
CC
65
Cov
9%
parseNormal
552.0
parseRegularExpression
110.0
parseBoInternalregexcatchBc
56.0
CRAP 3205.4
« Kate/C.pm ↑ Summary Kate/JSP.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 'javascript-php.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7  
8 #kate xml version 1.10
9 #kate version 2.3
10 #kate author Anders Lund (anders@alweb.dk), Joseph Wenninger (jowenn@kde.org), Whitehawk Stormchaser (zerokode@gmx.net)
11 #generated: Sun Feb 3 22:02:05 2008, localtime
12  
13 package Syntax::Highlight::Engine::Kate::JavaScript_PHP;
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 1 ▶ my $proto = shift;
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
23 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
24 1 my $self = $class->SUPER::new(@_);
25 1 $self->attributes({
26 'Char' => 'Char',
27 'Comment' => 'Comment',
28 'Data Type' => 'DataType',
29 'Decimal' => 'DecVal',
30 'Events' => 'Keyword',
31 'Float' => 'Float',
32 'Function' => 'Function',
33 'Keyword' => 'Keyword',
34 'Math' => 'Keyword',
35 'Normal Text' => 'Normal',
36 'Objects' => 'Keyword',
37 'Pattern Character Class' => 'BaseN',
38 'Pattern Internal Operator' => 'Float',
39 'Region Marker' => 'RegionMarker',
40 'Regular Expression' => 'Others',
41 'String' => 'String',
42 'String Char' => 'Char',
43 'Symbol' => 'Normal',
44 });
45 1 $self->listAdd('events',
46 'onAbort',
47 'onBlur',
48 'onChange',
49 'onClick',
50 'onError',
51 'onFocus',
52 'onLoad',
53 'onMouseOut',
54 'onMouseOver',
55 'onReset',
56 'onSelect',
57 'onSubmit',
58 'onUnload',
59 );
60 1 $self->listAdd('functions',
61 'Number',
62 'escape',
63 'isFinite',
64 'isNaN',
65 'parseFloat',
66 'parseInt',
67 'reload',
68 'taint',
69 'unescape',
70 'untaint',
71 'write',
72 );
73 1 $self->listAdd('keywords',
74 'break',
75 'case',
76 'catch',
77 'const',
78 'continue',
79 'default',
80 'delete',
81 'do',
82 'else',
83 'false',
84 'finally',
85 'for',
86 'function',
87 'if',
88 'in',
89 'new',
90 'return',
91 'switch',
92 'throw',
93 'true',
94 'try',
95 'typeof',
96 'var',
97 'void',
98 'while',
99 'with',
100 );
101 1 $self->listAdd('math',
102 'E',
103 'LN10',
104 'LN2',
105 'LOG10E',
106 'LOG2E',
107 'PI',
108 'SQRT1_2',
109 'SQRT2',
110 'abs',
111 'acos',
112 'asin',
113 'atan',
114 'atan2',
115 'ceil',
116 'cos',
117 'ctg',
118 'exp',
119 'floor',
120 'log',
121 'pow',
122 'round',
123 'sin',
124 'sqrt',
125 'tan',
126 );
127 1 $self->listAdd('methods',
128 'MAX_VALUE',
129 'MIN_VALUE',
130 'NEGATIVE_INFINITY',
131 'NaN',
132 'POSITIVE_INFINITY',
133 'URL',
134 'UTC',
135 'above',
136 'action',
137 'alert',
138 'alinkColor',
139 'anchor',
140 'anchors',
141 'appCodeName',
142 'appName',
143 'appVersion',
144 'applets',
145 'apply',
146 'argument',
147 'arguments',
148 'arity',
149 'availHeight',
150 'availWidth',
151 'back',
152 'background',
153 'below',
154 'bgColor',
155 'big',
156 'blink',
157 'blur',
158 'bold',
159 'border',
160 'border',
161 'call',
162 'caller',
163 'charAt',
164 'charCodeAt',
165 'checked',
166 'clearInterval',
167 'clearTimeout',
168 'click',
169 'clip',
170 'close',
171 'closed',
172 'colorDepth',
173 'compile',
174 'complete',
175 'confirm',
176 'constructor',
177 'cookie',
178 'current',
179 'cursor',
180 'data',
181 'defaultChecked',
182 'defaultSelected',
183 'defaultStatus',
184 'defaultValue',
185 'description',
186 'disableExternalCapture',
187 'domain',
188 'elements',
189 'embeds',
190 'enableExternalCapture',
191 'enabledPlugin',
192 'encoding',
193 'eval',
194 'exec',
195 'fgColor',
196 'filename',
197 'find',
198 'fixed',
199 'focus',
200 'fontcolor',
201 'fontsize',
202 'form',
203 'formName',
204 'forms',
205 'forward',
206 'frames',
207 'fromCharCode',
208 'getDate',
209 'getDay',
210 'getHours',
211 'getMiliseconds',
212 'getMinutes',
213 'getMonth',
214 'getSeconds',
215 'getSelection',
216 'getTime',
217 'getTimezoneOffset',
218 'getUTCDate',
219 'getUTCDay',
220 'getUTCFullYear',
221 'getUTCHours',
222 'getUTCMilliseconds',
223 'getUTCMinutes',
224 'getUTCMonth',
225 'getUTCSeconds',
226 'getYear',
227 'global',
228 'go',
229 'hash',
230 'height',
231 'history',
232 'home',
233 'host',
234 'hostname',
235 'href',
236 'hspace',
237 'ignoreCase',
238 'images',
239 'index',
240 'indexOf',
241 'innerHeight',
242 'innerWidth',
243 'input',
244 'italics',
245 'javaEnabled',
246 'join',
247 'language',
248 'lastIndex',
249 'lastIndexOf',
250 'lastModified',
251 'lastParen',
252 'layerX',
253 'layerY',
254 'layers',
255 'left',
256 'leftContext',
257 'length',
258 'link',
259 'linkColor',
260 'links',
261 'load',
262 'location',
263 'locationbar',
264 'lowsrc',
265 'match',
266 'menubar',
267 'method',
268 'mimeTypes',
269 'modifiers',
270 'moveAbove',
271 'moveBelow',
272 'moveBy',
273 'moveTo',
274 'moveToAbsolute',
275 'multiline',
276 'name',
277 'negative_infinity',
278 'next',
279 'open',
280 'opener',
281 'options',
282 'outerHeight',
283 'outerWidth',
284 'pageX',
285 'pageXoffset',
286 'pageY',
287 'pageYoffset',
288 'parent',
289 'parse',
290 'pathname',
291 'personalbar',
292 'pixelDepth',
293 'platform',
294 'plugins',
295 'pop',
296 'port',
297 'positive_infinity',
298 'preference',
299 'previous',
300 'print',
301 'prompt',
302 'protocol',
303 'prototype',
304 'push',
305 'referrer',
306 'refresh',
307 'releaseEvents',
308 'reload',
309 'replace',
310 'reset',
311 'resizeBy',
312 'resizeTo',
313 'reverse',
314 'rightContext',
315 'screenX',
316 'screenY',
317 'scroll',
318 'scrollBy',
319 'scrollTo',
320 'scrollbar',
321 'search',
322 'select',
323 'selected',
324 'selectedIndex',
325 'self',
326 'setDate',
327 'setHours',
328 'setMinutes',
329 'setMonth',
330 'setSeconds',
331 'setTime',
332 'setTimeout',
333 'setUTCDate',
334 'setUTCDay',
335 'setUTCFullYear',
336 'setUTCHours',
337 'setUTCMilliseconds',
338 'setUTCMinutes',
339 'setUTCMonth',
340 'setUTCSeconds',
341 'setYear',
342 'shift',
343 'siblingAbove',
344 'siblingBelow',
345 'small',
346 'sort',
347 'source',
348 'splice',
349 'split',
350 'src',
351 'status',
352 'statusbar',
353 'strike',
354 'sub',
355 'submit',
356 'substr',
357 'substring',
358 'suffixes',
359 'sup',
360 'taintEnabled',
361 'target',
362 'test',
363 'text',
364 'title',
365 'toGMTString',
366 'toLocaleString',
367 'toLowerCase',
368 'toSource',
369 'toString',
370 'toUTCString',
371 'toUpperCase',
372 'toolbar',
373 'top',
374 'type',
375 'unshift',
376 'unwatch',
377 'userAgent',
378 'value',
379 'valueOf',
380 'visibility',
381 'vlinkColor',
382 'vspace',
383 'watch',
384 'which',
385 'width',
386 'width',
387 'write',
388 'writeln',
389 'x',
390 'y',
391 'zIndex',
392 );
393 1 $self->listAdd('objects',
394 'Anchor',
395 'Applet',
396 'Area',
397 'Array',
398 'Boolean',
399 'Button',
400 'Checkbox',
401 'Date',
402 'FileUpload',
403 'Form',
404 'Frame',
405 'Function',
406 'Hidden',
407 'Image',
408 'Layer',
409 'Link',
410 'Math',
411 'Max',
412 'MimeType',
413 'Min',
414 'Object',
415 'Password',
416 'Plugin',
417 'Radio',
418 'RegExp',
419 'Reset',
420 'Screen',
421 'Select',
422 'String',
423 'Text',
424 'Textarea',
425 'Window',
426 'document',
427 'navigator',
428 'this',
429 'window',
430 );
431 1 $self->contextdata({
432 '(Internal regex catch)' => {
433 callback => \&parseBoInternalregexcatchBc,
434 attribute => 'Normal Text',
435 fallthrough => '#pop',
436 },
437 '(charclass caret first check)' => {
438 callback => \&parseBocharclasscaretfirstcheckBc,
439 attribute => 'Pattern Internal Operator',
440 lineending => '#pop',
441 fallthrough => 'Regular Expression Character Class',
442 },
443 '(regex caret first check)' => {
444 callback => \&parseBoregexcaretfirstcheckBc,
445 attribute => 'Pattern Internal Operator',
446 lineending => '#pop',
447 fallthrough => 'Regular Expression',
448 },
449 'Comment' => {
450 callback => \&parseComment,
451 attribute => 'Comment',
452 lineending => '#pop',
453 },
454 'FindPHP' => {
455 callback => \&parseFindPHP,
456 },
457 'Multi/inline Comment' => {
458 callback => \&parseMultiinlineComment,
459 attribute => 'Comment',
460 },
461 'Normal' => {
462 callback => \&parseNormal,
463 attribute => 'Normal Text',
464 },
465 'Regular Expression' => {
466 callback => \&parseRegularExpression,
467 attribute => 'Regular Expression',
468 },
469 'Regular Expression Character Class' => {
470 callback => \&parseRegularExpressionCharacterClass,
471 attribute => 'Pattern Character Class',
472 },
473 'String' => {
474 callback => \&parseString,
475 attribute => 'String',
476 lineending => '#pop',
477 },
478 'String 1' => {
479 callback => \&parseString1,
480 attribute => 'String Char',
481 lineending => '#pop',
482 },
483 'region_marker' => {
484 callback => \&parseregion_marker,
485 attribute => 'Region Marker',
486 lineending => '#pop',
487 },
488 });
489 1 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
490 1 $self->basecontext('Normal');
491 1 $self->keywordscase(0);
492 1 $self->initialize;
493 1 bless ($self, $class);
494 1 return $self;
495 }
496  
497 sub language {
498 0 ▶ return 'JavaScript/PHP';
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
499 }
500  
501 sub parseBoInternalregexcatchBc {
502 0 ▶ my ($self, $text) = @_;
Subroutine parseBoInternalregexcatchBc: not called CC=7 SCAR=40.3
Pod undocumented
503 # context => 'FindPHP'
504 # type => 'IncludeRules'
505 0 ▶ if ($self->includeRules('FindPHP', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("FindPHP", $text)) 0 0 0
506 0 return 1
507 }
508 # String => '\s*'
509 # attribute => 'Normal Text'
510 # context => '#stay'
511 # type => 'RegExpr'
512 0 ▶ if ($self->testRegExpr($text, '\\s*', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\s*", 0, 0, 0, undef, 0, "#stay", "Normal Text")) 0 0 0
513 0 return 1
514 }
515 # String => '//(?=;)'
516 # attribute => 'Regular Expression'
517 # context => '#pop'
518 # type => 'RegExpr'
519 0 ▶ if ($self->testRegExpr($text, '//(?=;)', 0, 0, 0, undef, 0, '#pop', 'Regular Expression')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "//(?=;)", 0, 0, 0, undef, 0, "#pop", "Regular Expression")) 0 0 0
520 0 return 1
521 }
522 # attribute => 'Comment'
523 # char => '/'
524 # char1 => '/'
525 # context => 'Comment'
526 # type => 'Detect2Chars'
527 0 ▶ if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Comment', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "/", 0, 0, 0, undef, 0, "Comment", "Comment")) 0 0 0
528 0 return 1
529 }
530 # attribute => 'Comment'
531 # char => '/'
532 # char1 => '*'
533 # context => 'Multi/inline Comment'
534 # type => 'Detect2Chars'
535 0 ▶ if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Multi/inline Comment', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "*", 0, 0, 0, undef, 0, "Multi/inline Comment", "Comment")) 0 0 0
536 0 return 1
537 }
538 # attribute => 'Regular Expression'
539 # char => '/'
540 # context => '(regex caret first check)'
541 # type => 'DetectChar'
542 0 ▶ if ($self->testDetectChar($text, '/', 0, 0, 0, undef, 0, '(regex caret first check)', 'Regular Expression')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "/", 0, 0, 0, undef, 0, "(regex caret first check)", "Regular Expression")) 0 0 0
543 0 return 1
544 }
545 0 return 0;
546 };
547  
548 sub parseBocharclasscaretfirstcheckBc {
549 0 ▶ my ($self, $text) = @_;
Subroutine parseBocharclasscaretfirstcheckBc: not called CC=3 SCAR=24.8
Pod undocumented
550 # context => 'FindPHP'
551 # type => 'IncludeRules'
552 0 ▶ if ($self->includeRules('FindPHP', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("FindPHP", $text)) 0 0 0
553 0 return 1
554 }
555 # attribute => 'Pattern Internal Operator'
556 # char => '^'
557 # context => 'Regular Expression Character Class'
558 # type => 'DetectChar'
559 0 ▶ if ($self->testDetectChar($text, '^', 0, 0, 0, undef, 0, 'Regular Expression Character Class', 'Pattern Internal Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "^", 0, 0, 0, undef, 0, "Regular Expression Character Class", "Pattern Internal Operator")) 0 0 0
560 0 return 1
561 }
562 0 return 0;
563 };
564  
565 sub parseBoregexcaretfirstcheckBc {
566 0 ▶ my ($self, $text) = @_;
Subroutine parseBoregexcaretfirstcheckBc: not called CC=3 SCAR=24.8
Pod undocumented
567 # context => 'FindPHP'
568 # type => 'IncludeRules'
569 0 ▶ if ($self->includeRules('FindPHP', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("FindPHP", $text)) 0 0 0
570 0 return 1
571 }
572 # attribute => 'Pattern Internal Operator'
573 # char => '^'
574 # context => 'Regular Expression'
575 # type => 'DetectChar'
576 0 ▶ if ($self->testDetectChar($text, '^', 0, 0, 0, undef, 0, 'Regular Expression', 'Pattern Internal Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "^", 0, 0, 0, undef, 0, "Regular Expression", "Pattern Internal Operator")) 0 0 0
577 0 return 1
578 }
579 0 return 0;
580 };
581  
582 sub parseComment {
583 0 ▶ my ($self, $text) = @_;
Subroutine parseComment: not called CC=5 SCAR=34.0
Pod undocumented
584 # context => 'FindPHP'
585 # type => 'IncludeRules'
586 0 ▶ if ($self->includeRules('FindPHP', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("FindPHP", $text)) 0 0 0
587 0 return 1
588 }
589 # type => 'DetectSpaces'
590 0 ▶ if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectSpaces($text, 0, undef, 0, "#stay", undef)) 0 0 0
591 0 return 1
592 }
593 # context => '##Alerts'
594 # type => 'IncludeRules'
595 0 ▶ if ($self->includePlugin('Alerts', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includePlugin("Alerts", $text)) 0 0 0
596 0 return 1
597 }
598 # type => 'DetectIdentifier'
599 0 ▶ if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectIdentifier($text, 0, undef, 0, "#stay", undef)) 0 0 0
600 0 return 1
601 }
602 0 return 0;
603 };
604  
605 sub parseFindPHP {
606 0 ▶ my ($self, $text) = @_;
Subroutine parseFindPHP: not called CC=2 SCAR=17.9
Pod undocumented
607 # String => '<\?(?:=|php)?'
608 # context => '##PHP/PHP'
609 # lookAhead => 'true'
610 # type => 'RegExpr'
611 0 ▶ if ($self->testRegExpr($text, '<\\?(?:=|php)?', 0, 0, 1, undef, 0, '##PHP/PHP', undef)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "<\\?(?:=|php)?", 0, 0, 1, undef, 0, "##PHP/PHP", undef)) 0 0 0
612 0 return 1
613 }
614 0 return 0;
615 };
616  
617 sub parseMultiinlineComment {
618 0 ▶ my ($self, $text) = @_;
Subroutine parseMultiinlineComment: not called CC=4 SCAR=30.0
Pod undocumented
619 # context => 'FindPHP'
620 # type => 'IncludeRules'
621 0 ▶ if ($self->includeRules('FindPHP', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("FindPHP", $text)) 0 0 0
622 0 return 1
623 }
624 # context => '##Alerts'
625 # type => 'IncludeRules'
626 0 ▶ if ($self->includePlugin('Alerts', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includePlugin("Alerts", $text)) 0 0 0
627 0 return 1
628 }
629 # attribute => 'Comment'
630 # char => '*'
631 # char1 => '/'
632 # context => '#pop'
633 # endRegion => 'Comment'
634 # type => 'Detect2Chars'
635 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
636 0 return 1
637 }
638 0 return 0;
639 };
640  
641 sub parseNormal {
642 0 ▶ my ($self, $text) = @_;
Subroutine parseNormal: not called CC=23 SCAR=63.1
Pod undocumented
643 # context => 'FindPHP'
644 # type => 'IncludeRules'
645 0 ▶ if ($self->includeRules('FindPHP', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("FindPHP", $text)) 0 0 0
646 0 return 1
647 }
648 # type => 'DetectSpaces'
649 0 ▶ if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectSpaces($text, 0, undef, 0, "#stay", undef)) 0 0 0
650 0 return 1
651 }
652 # String => '//BEGIN'
653 # attribute => 'Region Marker'
654 # beginRegion => 'Region1'
655 # context => 'region_marker'
656 # type => 'StringDetect'
657 0 ▶ if ($self->testStringDetect($text, '//BEGIN', 0, 0, 0, undef, 0, 'region_marker', 'Region Marker')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "//BEGIN", 0, 0, 0, undef, 0, "region_marker", "Region Marker")) 0 0 0
658 0 return 1
659 }
660 # String => '//END'
661 # attribute => 'Region Marker'
662 # context => 'region_marker'
663 # endRegion => 'Region1'
664 # type => 'RegExpr'
665 0 ▶ if ($self->testRegExpr($text, '//END', 0, 0, 0, undef, 0, 'region_marker', 'Region Marker')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "//END", 0, 0, 0, undef, 0, "region_marker", "Region Marker")) 0 0 0
666 0 return 1
667 }
668 # String => 'keywords'
669 # attribute => 'Keyword'
670 # context => '#stay'
671 # type => 'keyword'
672 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
673 0 return 1
674 }
675 # String => 'functions'
676 # attribute => 'Function'
677 # context => '#stay'
678 # type => 'keyword'
679 0 ▶ if ($self->testKeyword($text, 'functions', 0, undef, 0, '#stay', 'Function')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "functions", 0, undef, 0, "#stay", "Function")) 0 0 0
680 0 return 1
681 }
682 # String => 'objects'
683 # attribute => 'Objects'
684 # context => '#stay'
685 # type => 'keyword'
686 0 ▶ if ($self->testKeyword($text, 'objects', 0, undef, 0, '#stay', 'Objects')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "objects", 0, undef, 0, "#stay", "Objects")) 0 0 0
687 0 return 1
688 }
689 # String => 'math'
690 # attribute => 'Math'
691 # context => '#stay'
692 # type => 'keyword'
693 0 ▶ if ($self->testKeyword($text, 'math', 0, undef, 0, '#stay', 'Math')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "math", 0, undef, 0, "#stay", "Math")) 0 0 0
694 0 return 1
695 }
696 # String => 'events'
697 # attribute => 'Events'
698 # context => '#stay'
699 # type => 'keyword'
700 0 ▶ if ($self->testKeyword($text, 'events', 0, undef, 0, '#stay', 'Events')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "events", 0, undef, 0, "#stay", "Events")) 0 0 0
701 0 return 1
702 }
703 # String => 'methods'
704 # attribute => 'Data Type'
705 # context => '#stay'
706 # type => 'keyword'
707 0 ▶ if ($self->testKeyword($text, 'methods', 0, undef, 0, '#stay', 'Data Type')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "methods", 0, undef, 0, "#stay", "Data Type")) 0 0 0
708 0 return 1
709 }
710 # type => 'DetectIdentifier'
711 0 ▶ if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectIdentifier($text, 0, undef, 0, "#stay", undef)) 0 0 0
712 0 return 1
713 }
714 # attribute => 'Float'
715 # context => '#stay'
716 # type => 'Float'
717 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
718 0 return 1
719 }
720 # attribute => 'Decimal'
721 # context => '#stay'
722 # type => 'Int'
723 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
724 0 return 1
725 }
726 # attribute => 'String'
727 # char => '"'
728 # context => 'String'
729 # type => 'DetectChar'
730 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
731 0 return 1
732 }
733 # attribute => 'String'
734 # char => '''
735 # context => 'String 1'
736 # type => 'DetectChar'
737 0 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'String 1', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "String 1", "String")) 0 0 0
738 0 return 1
739 }
740 # attribute => 'Comment'
741 # char => '/'
742 # char1 => '/'
743 # context => 'Comment'
744 # type => 'Detect2Chars'
745 0 ▶ if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Comment', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "/", 0, 0, 0, undef, 0, "Comment", "Comment")) 0 0 0
746 0 return 1
747 }
748 # attribute => 'Comment'
749 # beginRegion => 'Comment'
750 # char => '/'
751 # char1 => '*'
752 # context => 'Multi/inline Comment'
753 # type => 'Detect2Chars'
754 0 ▶ if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Multi/inline Comment', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "*", 0, 0, 0, undef, 0, "Multi/inline Comment", "Comment")) 0 0 0
755 0 return 1
756 }
757 # String => '[=?:]'
758 # attribute => 'Normal Text'
759 # context => '(Internal regex catch)'
760 # type => 'RegExpr'
761 0 ▶ if ($self->testRegExpr($text, '[=?:]', 0, 0, 0, undef, 0, '(Internal regex catch)', 'Normal Text')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[=?:]", 0, 0, 0, undef, 0, "(Internal regex catch)", "Normal Text")) 0 0 0
762 0 return 1
763 }
764 # String => '\('
765 # attribute => 'Normal Text'
766 # context => '(Internal regex catch)'
767 # type => 'RegExpr'
768 0 ▶ if ($self->testRegExpr($text, '\\(', 0, 0, 0, undef, 0, '(Internal regex catch)', 'Normal Text')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\(", 0, 0, 0, undef, 0, "(Internal regex catch)", "Normal Text")) 0 0 0
769 0 return 1
770 }
771 # attribute => 'Symbol'
772 # beginRegion => 'Brace1'
773 # char => '{'
774 # context => '#stay'
775 # type => 'DetectChar'
776 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
777 0 return 1
778 }
779 # attribute => 'Symbol'
780 # char => '}'
781 # context => '#stay'
782 # endRegion => 'Brace1'
783 # type => 'DetectChar'
784 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
785 0 return 1
786 }
787 # String => ':!%&+,-/.*<=>?[]|~^;'
788 # attribute => 'Symbol'
789 # context => '#stay'
790 # type => 'AnyChar'
791 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
792 0 return 1
793 }
794 0 return 0;
795 };
796  
797 sub parseRegularExpression {
798 0 ▶ my ($self, $text) = @_;
Subroutine parseRegularExpression: not called CC=10 SCAR=47.0
Pod undocumented
799 # context => 'FindPHP'
800 # type => 'IncludeRules'
801 0 ▶ if ($self->includeRules('FindPHP', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("FindPHP", $text)) 0 0 0
802 0 return 1
803 }
804 # String => '/[ig]{0,2}'
805 # attribute => 'Regular Expression'
806 # context => '#pop#pop#pop'
807 # type => 'RegExpr'
808 0 ▶ if ($self->testRegExpr($text, '/[ig]{0,2}', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Regular Expression')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "/[ig]{0,2}", 0, 0, 0, undef, 0, "#pop#pop#pop", "Regular Expression")) 0 0 0
809 0 return 1
810 }
811 # String => '\{[\d, ]+\}'
812 # attribute => 'Pattern Internal Operator'
813 # context => '#stay'
814 # type => 'RegExpr'
815 0 ▶ if ($self->testRegExpr($text, '\\{[\\d, ]+\\}', 0, 0, 0, undef, 0, '#stay', 'Pattern Internal Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\{[\\d, ]+\\}", 0, 0, 0, undef, 0, "#stay", "Pattern Internal Operator")) 0 0 0
816 0 return 1
817 }
818 # String => '\\[bB]'
819 # attribute => 'Pattern Internal Operator'
820 # context => '#stay'
821 # type => 'RegExpr'
822 0 ▶ if ($self->testRegExpr($text, '\\\\[bB]', 0, 0, 0, undef, 0, '#stay', 'Pattern Internal Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\\\[bB]", 0, 0, 0, undef, 0, "#stay", "Pattern Internal Operator")) 0 0 0
823 0 return 1
824 }
825 # String => '\\[nrtvfDdSsWw]'
826 # attribute => 'Pattern Character Class'
827 # context => '#stay'
828 # type => 'RegExpr'
829 0 ▶ if ($self->testRegExpr($text, '\\\\[nrtvfDdSsWw]', 0, 0, 0, undef, 0, '#stay', 'Pattern Character Class')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\\\[nrtvfDdSsWw]", 0, 0, 0, undef, 0, "#stay", "Pattern Character Class")) 0 0 0
830 0 return 1
831 }
832 # attribute => 'Pattern Character Class'
833 # char => '['
834 # context => '(charclass caret first check)'
835 # type => 'DetectChar'
836 0 ▶ if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, '(charclass caret first check)', 'Pattern Character Class')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "[", 0, 0, 0, undef, 0, "(charclass caret first check)", "Pattern Character Class")) 0 0 0
837 0 return 1
838 }
839 # String => '\\.'
840 # attribute => 'Pattern Internal Operator'
841 # context => '#stay'
842 # type => 'RegExpr'
843 0 ▶ if ($self->testRegExpr($text, '\\\\.', 0, 0, 0, undef, 0, '#stay', 'Pattern Internal Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\\\.", 0, 0, 0, undef, 0, "#stay", "Pattern Internal Operator")) 0 0 0
844 0 return 1
845 }
846 # String => '\$(?=/)'
847 # attribute => 'Pattern Internal Operator'
848 # context => '#stay'
849 # type => 'RegExpr'
850 0 ▶ if ($self->testRegExpr($text, '\\$(?=/)', 0, 0, 0, undef, 0, '#stay', 'Pattern Internal Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\\$(?=/)", 0, 0, 0, undef, 0, "#stay", "Pattern Internal Operator")) 0 0 0
851 0 return 1
852 }
853 # String => '?+*()|'
854 # attribute => 'Pattern Internal Operator'
855 # context => '#stay'
856 # type => 'AnyChar'
857 0 ▶ if ($self->testAnyChar($text, '?+*()|', 0, 0, undef, 0, '#stay', 'Pattern Internal Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testAnyChar($text, "?+*()|", 0, 0, undef, 0, "#stay", "Pattern Internal Operator")) 0 0 0
858 0 return 1
859 }
860 0 return 0;
861 };
862  
863 sub parseRegularExpressionCharacterClass {
864 0 ▶ my ($self, $text) = @_;
Subroutine parseRegularExpressionCharacterClass: not called CC=4 SCAR=30.0
Pod undocumented
865 # context => 'FindPHP'
866 # type => 'IncludeRules'
867 0 ▶ if ($self->includeRules('FindPHP', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("FindPHP", $text)) 0 0 0
868 0 return 1
869 }
870 # String => '\\[\[\]]'
871 # attribute => 'Pattern Character Class'
872 # context => '#stay'
873 # type => 'RegExpr'
874 0 ▶ if ($self->testRegExpr($text, '\\\\[\\[\\]]', 0, 0, 0, undef, 0, '#stay', 'Pattern Character Class')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\\\[\\[\\]]", 0, 0, 0, undef, 0, "#stay", "Pattern Character Class")) 0 0 0
875 0 return 1
876 }
877 # attribute => 'Pattern Character Class'
878 # char => ']'
879 # context => '#pop#pop'
880 # type => 'DetectChar'
881 0 ▶ if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop#pop', 'Pattern Character Class')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "]", 0, 0, 0, undef, 0, "#pop#pop", "Pattern Character Class")) 0 0 0
882 0 return 1
883 }
884 0 return 0;
885 };
886  
887 sub parseString {
888 0 ▶ my ($self, $text) = @_;
Subroutine parseString: not called CC=5 SCAR=34.0
Pod undocumented
889 # context => 'FindPHP'
890 # type => 'IncludeRules'
891 0 ▶ if ($self->includeRules('FindPHP', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("FindPHP", $text)) 0 0 0
892 0 return 1
893 }
894 # type => 'DetectIdentifier'
895 0 ▶ if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectIdentifier($text, 0, undef, 0, "#stay", undef)) 0 0 0
896 0 return 1
897 }
898 # attribute => 'String Char'
899 # context => '#stay'
900 # type => 'HlCStringChar'
901 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
902 0 return 1
903 }
904 # attribute => 'String'
905 # char => '"'
906 # context => '#pop'
907 # type => 'DetectChar'
908 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
909 0 return 1
910 }
911 0 return 0;
912 };
913  
914 sub parseString1 {
915 0 ▶ my ($self, $text) = @_;
Subroutine parseString1: not called CC=5 SCAR=34.0
Pod undocumented
916 # context => 'FindPHP'
917 # type => 'IncludeRules'
918 0 ▶ if ($self->includeRules('FindPHP', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("FindPHP", $text)) 0 0 0
919 0 return 1
920 }
921 # type => 'DetectIdentifier'
922 0 ▶ if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectIdentifier($text, 0, undef, 0, "#stay", undef)) 0 0 0
923 0 return 1
924 }
925 # attribute => 'String'
926 # char => '"'
927 # context => 'String'
928 # type => 'DetectChar'
929 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
930 0 return 1
931 }
932 # attribute => 'String Char'
933 # char => '''
934 # context => '#pop'
935 # type => 'DetectChar'
936 0 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "#pop", "String Char")) 0 0 0
937 0 return 1
938 }
939 0 return 0;
940 };
941  
942 sub parseregion_marker {
943 0 ▶ my ($self, $text) = @_;
Subroutine parseregion_marker: not called CC=4 SCAR=30.0
Pod undocumented
944 # context => 'FindPHP'
945 # type => 'IncludeRules'
946 0 ▶ if ($self->includeRules('FindPHP', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("FindPHP", $text)) 0 0 0
947 0 return 1
948 }
949 # type => 'DetectIdentifier'
950 0 ▶ if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectIdentifier($text, 0, undef, 0, "#stay", undef)) 0 0 0
951 0 return 1
952 }
953 # type => 'DetectSpaces'
954 0 ▶ if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectSpaces($text, 0, undef, 0, "#stay", undef)) 0 0 0
955 0 return 1
956 }
957 0 return 0;
958 };
959  
960  
961 1 1;
962  
963 __END__
« Kate/C.pm ↑ Summary Kate/JSP.pm »