Kate/Desktop.pm

filter: Statementstmt 86.4% 32 / 37 Branchbran 75.0% 6 / 8 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 75.0% 6 / 8 Podpod 0.0% 0 / 5 totaltotal 71.4% 45 / 63 CC 6 SCAR 10.8
CC
6
Cov
81%
parseNormal
5.3
new
2.0
language
2.0
CRAP 3.0
« Kate.pm ↑ Summary Kate/All.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 'desktop.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 #generated: Sun Feb 3 22:02:04 2008, localtime
11  
12 package Syntax::Highlight::Engine::Kate::Desktop;
13  
14 1 our $VERSION = '0.16';
15  
16 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶use base('Syntax::Highlight::Engine::Kate::Template');
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 2 ▶sub new {
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
21 2 my $proto = shift;
22 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
23 2 my $self = $class->SUPER::new(@_);
24 2 $self->attributes({
25 'Comment' => 'Comment',
26 'Key' => 'DataType',
27 'Language' => 'DecVal',
28 'Normal Text' => 'Normal',
29 'Section' => 'Keyword',
30 });
31 2 $self->contextdata({
32 'Comment' => {
33 callback => \&parseComment,
34 attribute => 'Comment',
35 lineending => '#pop',
36 },
37 'Normal' => {
38 callback => \&parseNormal,
39 attribute => 'Key',
40 },
41 'Value' => {
42 callback => \&parseValue,
43 attribute => 'Normal Text',
44 lineending => '#pop',
45 },
46 });
47 2 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
48 2 $self->basecontext('Normal');
49 2 $self->keywordscase(1);
50 2 $self->initialize;
51 2 bless ($self, $class);
52 2 return $self;
53 }
54  
55 0 ▶sub language {
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
56 0 return '.desktop';
57 }
58  
59 0 ▶sub parseComment {
Subroutine parseComment: not called CC=1 SCAR=6.9
Pod undocumented
60 0 my ($self, $text) = @_;
61 0 return 0;
62 };
63  
64 364 ▶sub parseNormal {
Subroutine parseNormal: called CC=5 SCAR=16.6
Pod undocumented
65 364 my ($self, $text) = @_;
66 # String => '\[.*\]$'
67 # attribute => 'Section'
68 # beginRegion => 'Section'
69 # column => '0'
70 # context => '#stay'
71 # endRegion => 'Section'
72 # type => 'RegExpr'
73 364 ▶ if ($self->testRegExpr($text, '\\[.*\\]$', 0, 0, 0, 0, 0, '#stay', 'Section')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\[.*\\]\$", 0, 0, 0, 0, 0, "#stay", "Section")) 0 364 364
74 0 return 1
75 }
76 # String => '\[.*\]'
77 # attribute => 'Language'
78 # context => 'Value'
79 # type => 'RegExpr'
80 364 ▶ if ($self->testRegExpr($text, '\\[.*\\]', 0, 0, 0, undef, 0, 'Value', 'Language')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\[.*\\]", 0, 0, 0, undef, 0, "Value", "Language")) 8 356 364
81 8 return 1
82 }
83 # attribute => 'Comment'
84 # char => '#'
85 # context => 'Comment'
86 # firstNonSpace => 'true'
87 # type => 'DetectChar'
88 356 ▶ if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 1, 'Comment', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "#", 0, 0, 0, undef, 1, "Comment", "Comment")) 0 356 356
89 0 return 1
90 }
91 # attribute => 'Normal Text'
92 # char => '='
93 # context => 'Value'
94 # type => 'DetectChar'
95 356 ▶ if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, 'Value', 'Normal Text')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "=", 0, 0, 0, undef, 0, "Value", "Normal Text")) 30 326 356
96 30 return 1
97 }
98 326 return 0;
99 };
100  
101 272 ▶sub parseValue {
Subroutine parseValue: called CC=1 SCAR=0.0
Pod undocumented
102 272 my ($self, $text) = @_;
103 272 return 0;
104 };
105  
106  
107 1 1;
108  
109 __END__
« Kate.pm ↑ Summary Kate/All.pm »