Kate/Alerts.pm

filter: Statementstmt 96.4% 27 / 28 Branchbran 100% 2 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 83.3% 5 / 6 Podpod 0.0% 0 / 3 totaltotal 79.5% 35 / 44 CC 3 SCAR 4.9
CC
3
Cov
91%
new
2.0
language
2.0
parseNormalText
2.0
CRAP 1.6
« Kate/BaseTestchild.pm ↑ Summary
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 'alert.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7  
8 #kate xml version 1.06
9 #kate version 2.3
10 #kate author Dominik Haumann (dhdev@gmx.de)
11 #generated: Sun Feb 3 22:02:04 2008, localtime
12  
13 package Syntax::Highlight::Engine::Kate::Alerts;
14  
15 3 our $VERSION = '0.16';
16  
17 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 3 ▶use base('Syntax::Highlight::Engine::Kate::Template');
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 19 ▶sub new {
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
22 19 my $proto = shift;
23 19 ▶ my $class = ref($proto) || $proto;
Condition33%1/3
ref $proto || $proto
l!l&&r!l&&!r
0190
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 19 my $self = $class->SUPER::new(@_);
25 19 $self->attributes({
26 'Alert' => 'Alert',
27 'Normal Text' => 'Normal',
28 });
29 19 $self->listAdd('alerts',
30 '###',
31 'FIXME',
32 'HACK',
33 'NOTE',
34 'NOTICE',
35 'TASK',
36 'TODO',
37 );
38 19 $self->contextdata({
39 'Normal Text' => {
40 callback => \&parseNormalText,
41 attribute => 'Normal Text',
42 lineending => '#pop',
43 },
44 });
45 19 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
46 19 $self->basecontext('Normal Text');
47 19 $self->keywordscase(0);
48 19 $self->initialize;
49 19 bless ($self, $class);
50 19 return $self;
51 }
52  
53 0 ▶sub language {
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
54 0 return 'Alerts';
55 }
56  
57 11115 ▶sub parseNormalText {
Subroutine parseNormalText: called CC=2 SCAR=6.9
Pod undocumented
58 11115 my ($self, $text) = @_;
59 # String => 'alerts'
60 # attribute => 'Alert'
61 # context => '#stay'
62 # type => 'keyword'
63 11115 ▶ if ($self->testKeyword($text, 'alerts', 0, undef, 0, '#stay', 'Alert')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "alerts", 0, undef, 0, "#stay", "Alert")) 16 11099 11115
64 16 return 1
65 }
66 11099 return 0;
67 };
68  
69  
70 3 1;
71  
72 __END__
« Kate/BaseTestchild.pm ↑ Summary