Kate/En_US.pm

filter: Statementstmt 44.0% 26 / 59 Branchbran 0.0% 0 / 28 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 57.1% 4 / 7 Podpod 0.0% 0 / 4 totaltotal 30.1% 31 / 103 SCAR 46.4
CC
16
Cov
30%
parseNormal
156.0
parseString
20.0
new
2.0
CRAP 103.8
« Kate/De_DE.pm ↑ Summary Kate/Nl.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 'logohighlightstyle.en_US.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7  
8 #kate xml version 0.2
9 #kate version 2.1
10 #generated: Sun Feb 3 22:02:04 2008, localtime
11  
12 package Syntax::Highlight::Engine::Kate::En_US;
13  
14 1 our $VERSION = '0.14';
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 sub new {
21 1 ▶ my $proto = shift;
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
22 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
23 1 my $self = $class->SUPER::new(@_);
24 1 $self->attributes({
25 'Boolean Operators' => 'BString',
26 'Comment' => 'Comment',
27 'Execution Controllers' => 'BaseN',
28 'Expressers' => 'Datatype',
29 'MetaFunctions' => 'Function',
30 'Normal' => 'Normal',
31 'Normal Text' => 'Normal',
32 'Number' => 'Float',
33 'Operator' => 'Operator',
34 'Raw String' => 'String',
35 'Scopes' => 'RegionMarker',
36 'Statements' => 'Keyword',
37 'String' => 'String',
38 });
39 1 $self->listAdd('boolops',
40 'and',
41 'not',
42 'or',
43 );
44 1 $self->listAdd('controllers',
45 'break',
46 'do',
47 'else',
48 'for',
49 'foreach',
50 'if',
51 'in',
52 'repeat',
53 'return',
54 'rpt',
55 'to',
56 'wait',
57 'while',
58 );
59 1 $self->listAdd('metafunctions',
60 'learn',
61 );
62 1 $self->listAdd('statements',
63 'backward',
64 'bw',
65 'canvascolor',
66 'canvassize',
67 'cc',
68 'ccl',
69 'center',
70 'change',
71 'clear',
72 'cs',
73 'dir',
74 'direction',
75 'fontsize',
76 'fonttype',
77 'forward',
78 'fw',
79 'go',
80 'gox',
81 'goy',
82 'gx',
83 'gy',
84 'hide',
85 'inputwindow',
86 'message',
87 'pc',
88 'pd',
89 'pencolor',
90 'pendown',
91 'penup',
92 'penwidth',
93 'press',
94 'print',
95 'pu',
96 'pw',
97 'random',
98 'reset',
99 'run',
100 'sc',
101 'sh',
102 'show',
103 'sp',
104 'ss',
105 'tl',
106 'tr',
107 'turnleft',
108 'turnright',
109 'wrapoff',
110 'wrapon',
111 );
112 1 $self->contextdata({
113 'Normal' => {
114 callback => \&parseNormal,
115 attribute => 'Normal Text',
116 },
117 'String' => {
118 callback => \&parseString,
119 attribute => 'String',
120 },
121 });
122 1 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
123 1 $self->basecontext('Normal');
124 1 $self->keywordscase(0);
125 1 $self->initialize;
126 1 bless ($self, $class);
127 1 return $self;
128 }
129  
130 sub language {
131 0 ▶ return 'en_US';
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
132 }
133  
134 sub parseNormal {
135 0 ▶ my ($self, $text) = @_;
Subroutine parseNormal: not called CC=12 SCAR=50.5
Pod undocumented
136 # String => 'metafunctions'
137 # attribute => 'MetaFunctions'
138 # context => '#stay'
139 # type => 'keyword'
140 0 ▶ if ($self->testKeyword($text, 'metafunctions', 0, undef, 0, '#stay', 'MetaFunctions')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "metafunctions", 0, undef, 0, "#stay", "MetaFunctions")) 0 0 0
141 0 return 1
142 }
143 # String => 'statements'
144 # attribute => 'Statements'
145 # context => '#stay'
146 # type => 'keyword'
147 0 ▶ if ($self->testKeyword($text, 'statements', 0, undef, 0, '#stay', 'Statements')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "statements", 0, undef, 0, "#stay", "Statements")) 0 0 0
148 0 return 1
149 }
150 # String => 'controllers'
151 # attribute => 'Execution Controllers'
152 # context => '#stay'
153 # type => 'keyword'
154 0 ▶ if ($self->testKeyword($text, 'controllers', 0, undef, 0, '#stay', 'Execution Controllers')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "controllers", 0, undef, 0, "#stay", "Execution Controllers")) 0 0 0
155 0 return 1
156 }
157 # String => 'boolops'
158 # attribute => 'Boolean Operators'
159 # context => '#stay'
160 # type => 'keyword'
161 0 ▶ if ($self->testKeyword($text, 'boolops', 0, undef, 0, '#stay', 'Boolean Operators')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "boolops", 0, undef, 0, "#stay", "Boolean Operators")) 0 0 0
162 0 return 1
163 }
164 # String => '([!=><][=]|[><])'
165 # attribute => 'Expressers'
166 # context => '#stay'
167 # type => 'RegExpr'
168 0 ▶ if ($self->testRegExpr($text, '([!=><][=]|[><])', 0, 0, 0, undef, 0, '#stay', 'Expressers')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "([!=><][=]|[><])", 0, 0, 0, undef, 0, "#stay", "Expressers")) 0 0 0
169 0 return 1
170 }
171 # String => '[a-zA-Z_][a-zA-Z_0-9]+'
172 # attribute => 'Normal'
173 # context => '#stay'
174 # type => 'RegExpr'
175 0 ▶ if ($self->testRegExpr($text, '[a-zA-Z_][a-zA-Z_0-9]+', 0, 0, 0, undef, 0, '#stay', 'Normal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[a-zA-Z_][a-zA-Z_0-9]+", 0, 0, 0, undef, 0, "#stay", "Normal")) 0 0 0
176 0 return 1
177 }
178 # String => '([0-9]+\.[0-9]*|\.[0-9]+)?|[0-9]*'
179 # attribute => 'Number'
180 # context => '#stay'
181 # type => 'RegExpr'
182 0 ▶ if ($self->testRegExpr($text, '([0-9]+\\.[0-9]*|\\.[0-9]+)?|[0-9]*', 0, 0, 0, undef, 0, '#stay', 'Number')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "([0-9]+\\.[0-9]*|\\.[0-9]+)?|[0-9]*", 0, 0, 0, undef, 0, "#stay", "Number")) 0 0 0
183 0 return 1
184 }
185 # String => '#.*$'
186 # attribute => 'Comment'
187 # context => '#stay'
188 # type => 'RegExpr'
189 0 ▶ 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 0 0
190 0 return 1
191 }
192 # String => '[+*/\(\)-]'
193 # attribute => 'Operator'
194 # context => '#stay'
195 # type => 'RegExpr'
196 0 ▶ if ($self->testRegExpr($text, '[+*/\\(\\)-]', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[+*/\\(\\)-]", 0, 0, 0, undef, 0, "#stay", "Operator")) 0 0 0
197 0 return 1
198 }
199 # String => '[\[\]]'
200 # attribute => 'Scopes'
201 # context => '#stay'
202 # type => 'RegExpr'
203 0 ▶ if ($self->testRegExpr($text, '[\\[\\]]', 0, 0, 0, undef, 0, '#stay', 'Scopes')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[\\[\\]]", 0, 0, 0, undef, 0, "#stay", "Scopes")) 0 0 0
204 0 return 1
205 }
206 # attribute => 'String'
207 # char => '"'
208 # context => 'String'
209 # type => 'DetectChar'
210 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
211 0 return 1
212 }
213 0 return 0;
214 };
215  
216 sub parseString {
217 0 ▶ my ($self, $text) = @_;
Subroutine parseString: not called CC=4 SCAR=30.0
Pod undocumented
218 # attribute => 'String'
219 # context => '#stay'
220 # type => 'HlCStringChar'
221 0 ▶ if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCStringChar($text, 0, undef, 0, "#stay", "String")) 0 0 0
222 0 return 1
223 }
224 # String => '%[a-zA-Z]'
225 # attribute => 'Operator'
226 # context => '#stay'
227 # type => 'RegExpr'
228 0 ▶ if ($self->testRegExpr($text, '%[a-zA-Z]', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "%[a-zA-Z]", 0, 0, 0, undef, 0, "#stay", "Operator")) 0 0 0
229 0 return 1
230 }
231 # attribute => 'String'
232 # char => '"'
233 # context => '#pop'
234 # type => 'DetectChar'
235 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
236 0 return 1
237 }
238 0 return 0;
239 };
240  
241  
242 1 1;
243  
244 __END__
« Kate/De_DE.pm ↑ Summary Kate/Nl.pm »