Kate/ChangeLog.pm

filter: Statementstmt 56.4% 22 / 39 Branchbran 0.0% 0 / 10 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 50.0% 4 / 8 Podpod 0.0% 0 / 5 totaltotal 40.3% 27 / 67 CC 7 SCAR 18.9
CC
7
Cov
44%
parseNormal
12.0
parseline
12.0
parseentry
6.0
CRAP 6.6
« Kate/VRML.pm ↑ Summary Kate/M3U.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 'changelog.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7  
8 #kate xml version 1.04
9 #kate version 2.4
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::ChangeLog;
14  
15 1 our $VERSION = '0.16';
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 1 ▶sub new {
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
22 1 my $proto = shift;
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 'Date' => 'DataType',
27 'E-Mail' => 'Others',
28 'Entry' => 'DecVal',
29 'Name' => 'Keyword',
30 'Normal Text' => 'Normal',
31 });
32 1 $self->contextdata({
33 'Normal' => {
34 callback => \&parseNormal,
35 attribute => 'Normal Text',
36 },
37 'entry' => {
38 callback => \&parseentry,
39 attribute => 'Normal Text',
40 lineending => '#pop',
41 },
42 'line' => {
43 callback => \&parseline,
44 attribute => 'Normal Text',
45 lineending => '#pop',
46 },
47 });
48 1 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
49 1 $self->basecontext('Normal');
50 1 $self->keywordscase(0);
51 1 $self->initialize;
52 1 bless ($self, $class);
53 1 return $self;
54 }
55  
56 0 ▶sub language {
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
57 0 return 'ChangeLog';
58 }
59  
60 0 ▶sub parseNormal {
Subroutine parseNormal: not called CC=3 SCAR=24.8
Pod undocumented
61 0 my ($self, $text) = @_;
62 # attribute => 'Entry'
63 # char => '*'
64 # context => 'entry'
65 # firstNonSpace => 'true'
66 # type => 'DetectChar'
67 0 ▶ if ($self->testDetectChar($text, '*', 0, 0, 0, undef, 1, 'entry', 'Entry')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "*", 0, 0, 0, undef, 1, "entry", "Entry")) 0 0 0
68 0 return 1
69 }
70 # String => '\d\d\d\d\s*-\s*\d\d\s*-\s*\d\d\s*'
71 # attribute => 'Date'
72 # column => '0'
73 # context => 'line'
74 # type => 'RegExpr'
75 0 ▶ if ($self->testRegExpr($text, '\\d\\d\\d\\d\\s*-\\s*\\d\\d\\s*-\\s*\\d\\d\\s*', 0, 0, 0, 0, 0, 'line', 'Date')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\d\\d\\d\\d\\s*-\\s*\\d\\d\\s*-\\s*\\d\\d\\s*", 0, 0, 0, 0, 0, "line", "Date")) 0 0 0
76 0 return 1
77 }
78 0 return 0;
79 };
80  
81 0 ▶sub parseentry {
Subroutine parseentry: not called CC=2 SCAR=17.9
Pod undocumented
82 0 my ($self, $text) = @_;
83 # String => '.*:'
84 # attribute => 'Entry'
85 # context => '#pop'
86 # minimal => 'true'
87 # type => 'RegExpr'
88 0 ▶ if ($self->testRegExpr($text, '.*?:', 0, 0, 0, undef, 0, '#pop', 'Entry')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, ".*?:", 0, 0, 0, undef, 0, "#pop", "Entry")) 0 0 0
89 0 return 1
90 }
91 0 return 0;
92 };
93  
94 0 ▶sub parseline {
Subroutine parseline: not called CC=3 SCAR=24.8
Pod undocumented
95 0 my ($self, $text) = @_;
96 # String => '(\w\s*)+'
97 # attribute => 'Name'
98 # context => '#stay'
99 # type => 'RegExpr'
100 0 ▶ if ($self->testRegExpr($text, '(\\w\\s*)+', 0, 0, 0, undef, 0, '#stay', 'Name')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "(\\w\\s*)+", 0, 0, 0, undef, 0, "#stay", "Name")) 0 0 0
101 0 return 1
102 }
103 # String => '<.*>\s*$'
104 # attribute => 'E-Mail'
105 # context => '#pop'
106 # type => 'RegExpr'
107 0 ▶ if ($self->testRegExpr($text, '<.*>\\s*$', 0, 0, 0, undef, 0, '#pop', 'E-Mail')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "<.*>\\s*\$", 0, 0, 0, undef, 0, "#pop", "E-Mail")) 0 0 0
108 0 return 1
109 }
110 0 return 0;
111 };
112  
113  
114 1 1;
115  
116 __END__
« Kate/VRML.pm ↑ Summary Kate/M3U.pm »