Kate/Mason.pm

filter: Statementstmt 12.6% 23 / 182 Branchbran 0.0% 0 / 132 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 22.2% 4 / 18 Podpod 0.0% 0 / 15 totaltotal 7.9% 28 / 352 SCAR 82.2
CC
68
Cov
8%
parseEmbeddedPerl
506.0
parsePerlOneLiner
342.0
parseHTML
72.0
CRAP 3719.3
« Kate/Asm6502.pm ↑ Summary Kate/D.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 'mason.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.1
10 #generated: Sun Feb 3 22:02:05 2008, localtime
11  
12 package Syntax::Highlight::Engine::Kate::Mason;
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 'Char' => 'Char',
26 'Comment' => 'Comment',
27 'Data Type' => 'DataType',
28 'Decimal' => 'DecVal',
29 'Float' => 'Float',
30 'HTML' => 'String',
31 'Hex' => 'BaseN',
32 'Keyword' => 'Keyword',
33 'Mason Method' => 'Keyword',
34 'Mason Tag' => 'Keyword',
35 'Octal' => 'BaseN',
36 'Pattern' => 'Others',
37 'String' => 'String',
38 'String Char' => 'Char',
39 'Symbol' => 'Normal',
40 'normal' => 'Normal',
41 });
42 1 $self->listAdd('keywords',
43 '!',
44 'and',
45 'bless',
46 'caller',
47 'chomp',
48 'chop',
49 'close',
50 'cmp',
51 'continue',
52 'dbmclose',
53 'dbmopen',
54 'die',
55 'do',
56 'dump',
57 'each',
58 'echo',
59 'else',
60 'elsif',
61 'eq',
62 'eval',
63 'for',
64 'foreach',
65 'ge',
66 'goto',
67 'gt',
68 'if',
69 'import',
70 'last',
71 'le',
72 'local',
73 'lt',
74 'my',
75 'ne',
76 'new',
77 'next',
78 'no',
79 'not',
80 'open',
81 'or',
82 'pop',
83 'print',
84 'push',
85 'redo',
86 'ref',
87 'require',
88 'return',
89 'split',
90 'sub',
91 'switch',
92 'tie',
93 'tied',
94 'undef',
95 'unless',
96 'unlink',
97 'untie',
98 'use',
99 'wantarray',
100 'while',
101 'xor',
102 '||',
103 );
104 1 $self->contextdata({
105 'Commentar 1' => {
106 callback => \&parseCommentar1,
107 attribute => 'Comment',
108 lineending => '#pop',
109 },
110 'Commentar 2' => {
111 callback => \&parseCommentar2,
112 attribute => 'Comment',
113 },
114 'Documentation' => {
115 callback => \&parseDocumentation,
116 attribute => 'Comment',
117 },
118 'EmbeddedPerl' => {
119 callback => \&parseEmbeddedPerl,
120 attribute => 'normal',
121 },
122 'HTML' => {
123 callback => \&parseHTML,
124 attribute => 'HTML',
125 },
126 'MethodCall' => {
127 callback => \&parseMethodCall,
128 attribute => 'Mason Method',
129 },
130 'Pattern' => {
131 callback => \&parsePattern,
132 attribute => 'Pattern',
133 },
134 'Pattern2' => {
135 callback => \&parsePattern2,
136 attribute => 'Pattern',
137 },
138 'Pattern3' => {
139 callback => \&parsePattern3,
140 attribute => 'Pattern',
141 },
142 'PerlOneLiner' => {
143 callback => \&parsePerlOneLiner,
144 attribute => 'String',
145 lineending => '#pop',
146 },
147 'Something' => {
148 callback => \&parseSomething,
149 attribute => 'String Char',
150 },
151 'String' => {
152 callback => \&parseString,
153 attribute => 'String',
154 },
155 'String2' => {
156 callback => \&parseString2,
157 attribute => 'String',
158 },
159 });
160 1 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
161 1 $self->basecontext('HTML');
162 1 $self->keywordscase(0);
163 1 $self->initialize;
164 1 bless ($self, $class);
165 1 return $self;
166 }
167  
168 sub language {
169 0 ▶ return 'Mason';
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
170 }
171  
172 sub parseCommentar1 {
173 0 ▶ my ($self, $text) = @_;
Subroutine parseCommentar1: not called CC=1 SCAR=6.9
Pod undocumented
174 0 return 0;
175 };
176  
177 sub parseCommentar2 {
178 0 ▶ my ($self, $text) = @_;
Subroutine parseCommentar2: not called CC=2 SCAR=17.9
Pod undocumented
179 # attribute => 'Comment'
180 # char => '*'
181 # char1 => '/'
182 # context => '#pop'
183 # type => 'Detect2Chars'
184 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
185 0 return 1
186 }
187 0 return 0;
188 };
189  
190 sub parseDocumentation {
191 0 ▶ my ($self, $text) = @_;
Subroutine parseDocumentation: not called CC=2 SCAR=17.9
Pod undocumented
192 # String => '</%doc>'
193 # attribute => 'Comment'
194 # context => '#pop'
195 # insensitive => 'FALSE'
196 # type => 'StringDetect'
197 0 ▶ if ($self->testStringDetect($text, '</%doc>', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "</%doc>", 0, 0, 0, undef, 0, "#pop", "Comment")) 0 0 0
198 0 return 1
199 }
200 0 return 0;
201 };
202  
203 sub parseEmbeddedPerl {
204 0 ▶ my ($self, $text) = @_;
Subroutine parseEmbeddedPerl: not called CC=22 SCAR=62.3
Pod undocumented
205 # attribute => 'Mason Tag'
206 # char => '%'
207 # char1 => '>'
208 # context => '#pop'
209 # type => 'Detect2Chars'
210 0 ▶ if ($self->testDetect2Chars($text, '%', '>', 0, 0, 0, undef, 0, '#pop', 'Mason Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "%", ">", 0, 0, 0, undef, 0, "#pop", "Mason Tag")) 0 0 0
211 0 return 1
212 }
213 # String => '</%perl>'
214 # attribute => 'Mason Tag'
215 # context => '#pop'
216 # insensitive => 'FALSE'
217 # type => 'StringDetect'
218 0 ▶ if ($self->testStringDetect($text, '</%perl>', 0, 0, 0, undef, 0, '#pop', 'Mason Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "</%perl>", 0, 0, 0, undef, 0, "#pop", "Mason Tag")) 0 0 0
219 0 return 1
220 }
221 # String => '</%method>'
222 # attribute => 'Mason Tag'
223 # context => '#pop'
224 # insensitive => 'FALSE'
225 # type => 'StringDetect'
226 0 ▶ if ($self->testStringDetect($text, '</%method>', 0, 0, 0, undef, 0, '#pop', 'Mason Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "</%method>", 0, 0, 0, undef, 0, "#pop", "Mason Tag")) 0 0 0
227 0 return 1
228 }
229 # String => 'keywords'
230 # attribute => 'Keyword'
231 # context => '#stay'
232 # type => 'keyword'
233 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
234 0 return 1
235 }
236 # attribute => 'Octal'
237 # context => '#stay'
238 # type => 'HlCOct'
239 0 ▶ if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCOct($text, 0, undef, 0, "#stay", "Octal")) 0 0 0
240 0 return 1
241 }
242 # attribute => 'Hex'
243 # context => '#stay'
244 # type => 'HlCHex'
245 0 ▶ if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCHex($text, 0, undef, 0, "#stay", "Hex")) 0 0 0
246 0 return 1
247 }
248 # attribute => 'Decimal'
249 # context => '#stay'
250 # type => 'Int'
251 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
252 0 return 1
253 }
254 # attribute => 'Char'
255 # context => '#stay'
256 # type => 'HlCChar'
257 0 ▶ if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCChar($text, 0, undef, 0, "#stay", "Char")) 0 0 0
258 0 return 1
259 }
260 # String => '^#!.*'
261 # attribute => 'Keyword'
262 # context => '#stay'
263 # type => 'RegExpr'
264 0 ▶ if ($self->testRegExpr($text, '^#!.*', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "^#!.*", 0, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
265 0 return 1
266 }
267 # attribute => 'String'
268 # char => '"'
269 # context => 'String'
270 # type => 'DetectChar'
271 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
272 0 return 1
273 }
274 # attribute => 'String'
275 # char => '''
276 # context => 'String2'
277 # type => 'DetectChar'
278 0 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'String2', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "String2", "String")) 0 0 0
279 0 return 1
280 }
281 # attribute => 'String Char'
282 # char => '`'
283 # context => 'String'
284 # type => 'DetectChar'
285 0 ▶ if ($self->testDetectChar($text, '`', 0, 0, 0, undef, 0, 'String', 'String Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "`", 0, 0, 0, undef, 0, "String", "String Char")) 0 0 0
286 0 return 1
287 }
288 # attribute => 'Comment'
289 # char => '/'
290 # char1 => '/'
291 # context => 'Commentar 1'
292 # type => 'Detect2Chars'
293 0 ▶ if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "/", 0, 0, 0, undef, 0, "Commentar 1", "Comment")) 0 0 0
294 0 return 1
295 }
296 # attribute => 'Comment'
297 # char => '/'
298 # char1 => '*'
299 # context => 'Commentar 2'
300 # type => 'Detect2Chars'
301 0 ▶ if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "*", 0, 0, 0, undef, 0, "Commentar 2", "Comment")) 0 0 0
302 0 return 1
303 }
304 # attribute => 'Pattern'
305 # char => 's'
306 # char1 => '/'
307 # context => 'Pattern2'
308 # type => 'Detect2Chars'
309 0 ▶ if ($self->testDetect2Chars($text, 's', '/', 0, 0, 0, undef, 0, 'Pattern2', 'Pattern')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "s", "/", 0, 0, 0, undef, 0, "Pattern2", "Pattern")) 0 0 0
310 0 return 1
311 }
312 # attribute => 'Pattern'
313 # char => '/'
314 # context => 'Pattern'
315 # type => 'DetectChar'
316 0 ▶ if ($self->testDetectChar($text, '/', 0, 0, 0, undef, 0, 'Pattern', 'Pattern')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "/", 0, 0, 0, undef, 0, "Pattern", "Pattern")) 0 0 0
317 0 return 1
318 }
319 # String => '!%&()+,-<=>?[]^{|}~'
320 # attribute => 'Symbol'
321 # context => '#stay'
322 # type => 'AnyChar'
323 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
324 0 return 1
325 }
326 # String => '\$[0-9]+'
327 # attribute => 'Decimal'
328 # context => '#stay'
329 # type => 'RegExpr'
330 0 ▶ if ($self->testRegExpr($text, '\\$[0-9]+', 0, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\\$[0-9]+", 0, 0, 0, undef, 0, "#stay", "Decimal")) 0 0 0
331 0 return 1
332 }
333 # String => '\$\#?[a-zA-Z_]+[a-zA-Z0-9_]*'
334 # attribute => 'Data Type'
335 # context => '#stay'
336 # type => 'RegExpr'
337 0 ▶ if ($self->testRegExpr($text, '\\$\\#?[a-zA-Z_]+[a-zA-Z0-9_]*', 0, 0, 0, undef, 0, '#stay', 'Data Type')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\\$\\#?[a-zA-Z_]+[a-zA-Z0-9_]*", 0, 0, 0, undef, 0, "#stay", "Data Type")) 0 0 0
338 0 return 1
339 }
340 # String => '\s+\:'
341 # attribute => 'Pattern'
342 # context => '#stay'
343 # type => 'RegExpr'
344 0 ▶ if ($self->testRegExpr($text, '\\s+\\:', 0, 0, 0, undef, 0, '#stay', 'Pattern')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\s+\\:", 0, 0, 0, undef, 0, "#stay", "Pattern")) 0 0 0
345 0 return 1
346 }
347 # attribute => 'Comment'
348 # char => '#'
349 # context => 'Commentar 1'
350 # type => 'DetectChar'
351 0 ▶ if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "#", 0, 0, 0, undef, 0, "Commentar 1", "Comment")) 0 0 0
352 0 return 1
353 }
354 0 return 0;
355 };
356  
357 sub parseHTML {
358 0 ▶ my ($self, $text) = @_;
Subroutine parseHTML: not called CC=8 SCAR=42.8
Pod undocumented
359 # String => '<\%method[^>]*>'
360 # attribute => 'Mason Tag'
361 # context => 'EmbeddedPerl'
362 # type => 'RegExpr'
363 0 ▶ if ($self->testRegExpr($text, '<\\%method[^>]*>', 0, 0, 0, undef, 0, 'EmbeddedPerl', 'Mason Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "<\\%method[^>]*>", 0, 0, 0, undef, 0, "EmbeddedPerl", "Mason Tag")) 0 0 0
364 0 return 1
365 }
366 # String => '<%method>'
367 # attribute => 'Mason Tag'
368 # context => 'EmbeddedPerl'
369 # insensitive => 'FALSE'
370 # type => 'StringDetect'
371 0 ▶ if ($self->testStringDetect($text, '<%method>', 0, 0, 0, undef, 0, 'EmbeddedPerl', 'Mason Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "<%method>", 0, 0, 0, undef, 0, "EmbeddedPerl", "Mason Tag")) 0 0 0
372 0 return 1
373 }
374 # String => '<%doc>'
375 # attribute => 'Comment'
376 # context => 'Documentation'
377 # insensitive => 'FALSE'
378 # type => 'StringDetect'
379 0 ▶ if ($self->testStringDetect($text, '<%doc>', 0, 0, 0, undef, 0, 'Documentation', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "<%doc>", 0, 0, 0, undef, 0, "Documentation", "Comment")) 0 0 0
380 0 return 1
381 }
382 # String => '<%perl>'
383 # attribute => 'Mason Tag'
384 # context => 'EmbeddedPerl'
385 # insensitive => 'FALSE'
386 # type => 'StringDetect'
387 0 ▶ if ($self->testStringDetect($text, '<%perl>', 0, 0, 0, undef, 0, 'EmbeddedPerl', 'Mason Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "<%perl>", 0, 0, 0, undef, 0, "EmbeddedPerl", "Mason Tag")) 0 0 0
388 0 return 1
389 }
390 # attribute => 'Mason Tag'
391 # char => '<'
392 # char1 => '%'
393 # context => 'EmbeddedPerl'
394 # type => 'Detect2Chars'
395 0 ▶ if ($self->testDetect2Chars($text, '<', '%', 0, 0, 0, undef, 0, 'EmbeddedPerl', 'Mason Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "<", "%", 0, 0, 0, undef, 0, "EmbeddedPerl", "Mason Tag")) 0 0 0
396 0 return 1
397 }
398 # attribute => 'Mason Method'
399 # char => '<'
400 # char1 => '&'
401 # context => 'MethodCall'
402 # type => 'Detect2Chars'
403 0 ▶ if ($self->testDetect2Chars($text, '<', '&', 0, 0, 0, undef, 0, 'MethodCall', 'Mason Method')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "<", "&", 0, 0, 0, undef, 0, "MethodCall", "Mason Method")) 0 0 0
404 0 return 1
405 }
406 # String => '^%'
407 # attribute => 'Mason Tag'
408 # context => 'PerlOneLiner'
409 # type => 'RegExpr'
410 0 ▶ if ($self->testRegExpr($text, '^%', 0, 0, 0, undef, 0, 'PerlOneLiner', 'Mason Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "^%", 0, 0, 0, undef, 0, "PerlOneLiner", "Mason Tag")) 0 0 0
411 0 return 1
412 }
413 0 return 0;
414 };
415  
416 sub parseMethodCall {
417 0 ▶ my ($self, $text) = @_;
Subroutine parseMethodCall: not called CC=2 SCAR=17.9
Pod undocumented
418 # attribute => 'Mason Method'
419 # char => '&'
420 # char1 => '>'
421 # context => '#pop'
422 # type => 'Detect2Chars'
423 0 ▶ if ($self->testDetect2Chars($text, '&', '>', 0, 0, 0, undef, 0, '#pop', 'Mason Method')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "&", ">", 0, 0, 0, undef, 0, "#pop", "Mason Method")) 0 0 0
424 0 return 1
425 }
426 0 return 0;
427 };
428  
429 sub parsePattern {
430 0 ▶ my ($self, $text) = @_;
Subroutine parsePattern: not called CC=4 SCAR=30.0
Pod undocumented
431 # String => '\\[\/\[\]dDwWsSnrtfb0\$@]?'
432 # attribute => 'String Char'
433 # context => '#stay'
434 # type => 'RegExpr'
435 0 ▶ if ($self->testRegExpr($text, '\\\\[\\/\\[\\]dDwWsSnrtfb0\\$@]?', 0, 0, 0, undef, 0, '#stay', 'String Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\\\[\\/\\[\\]dDwWsSnrtfb0\\\$\@]?", 0, 0, 0, undef, 0, "#stay", "String Char")) 0 0 0
436 0 return 1
437 }
438 # String => '\^[\/\[\]]?'
439 # attribute => 'String Char'
440 # context => '#stay'
441 # type => 'RegExpr'
442 0 ▶ if ($self->testRegExpr($text, '\\^[\\/\\[\\]]?', 0, 0, 0, undef, 0, '#stay', 'String Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\^[\\/\\[\\]]?", 0, 0, 0, undef, 0, "#stay", "String Char")) 0 0 0
443 0 return 1
444 }
445 # attribute => 'Pattern'
446 # char => '/'
447 # context => '#pop'
448 # type => 'DetectChar'
449 0 ▶ if ($self->testDetectChar($text, '/', 0, 0, 0, undef, 0, '#pop', 'Pattern')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "/", 0, 0, 0, undef, 0, "#pop", "Pattern")) 0 0 0
450 0 return 1
451 }
452 0 return 0;
453 };
454  
455 sub parsePattern2 {
456 0 ▶ my ($self, $text) = @_;
Subroutine parsePattern2: not called CC=4 SCAR=30.0
Pod undocumented
457 # String => '\\[\/\[\]dDwWsSnrtfb0\$@]?'
458 # attribute => 'String Char'
459 # context => '#stay'
460 # type => 'RegExpr'
461 0 ▶ if ($self->testRegExpr($text, '\\\\[\\/\\[\\]dDwWsSnrtfb0\\$@]?', 0, 0, 0, undef, 0, '#stay', 'String Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\\\[\\/\\[\\]dDwWsSnrtfb0\\\$\@]?", 0, 0, 0, undef, 0, "#stay", "String Char")) 0 0 0
462 0 return 1
463 }
464 # String => '\^[\/\[\]]?'
465 # attribute => 'String Char'
466 # context => '#stay'
467 # type => 'RegExpr'
468 0 ▶ if ($self->testRegExpr($text, '\\^[\\/\\[\\]]?', 0, 0, 0, undef, 0, '#stay', 'String Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\^[\\/\\[\\]]?", 0, 0, 0, undef, 0, "#stay", "String Char")) 0 0 0
469 0 return 1
470 }
471 # String => '\/'
472 # attribute => 'Pattern'
473 # context => 'Pattern3'
474 # type => 'RegExpr'
475 0 ▶ if ($self->testRegExpr($text, '\\/', 0, 0, 0, undef, 0, 'Pattern3', 'Pattern')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\/", 0, 0, 0, undef, 0, "Pattern3", "Pattern")) 0 0 0
476 0 return 1
477 }
478 0 return 0;
479 };
480  
481 sub parsePattern3 {
482 0 ▶ my ($self, $text) = @_;
Subroutine parsePattern3: not called CC=4 SCAR=30.0
Pod undocumented
483 # String => '\\[\/\[\]dDwWsSnrtfb0\$@]?'
484 # attribute => 'String Char'
485 # context => '#stay'
486 # type => 'RegExpr'
487 0 ▶ if ($self->testRegExpr($text, '\\\\[\\/\\[\\]dDwWsSnrtfb0\\$@]?', 0, 0, 0, undef, 0, '#stay', 'String Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\\\[\\/\\[\\]dDwWsSnrtfb0\\\$\@]?", 0, 0, 0, undef, 0, "#stay", "String Char")) 0 0 0
488 0 return 1
489 }
490 # String => '\^[\/\[\]]?'
491 # attribute => 'String Char'
492 # context => '#stay'
493 # type => 'RegExpr'
494 0 ▶ if ($self->testRegExpr($text, '\\^[\\/\\[\\]]?', 0, 0, 0, undef, 0, '#stay', 'String Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\^[\\/\\[\\]]?", 0, 0, 0, undef, 0, "#stay", "String Char")) 0 0 0
495 0 return 1
496 }
497 # String => '\/g?'
498 # attribute => 'Pattern'
499 # context => '#pop#pop'
500 # type => 'RegExpr'
501 0 ▶ if ($self->testRegExpr($text, '\\/g?', 0, 0, 0, undef, 0, '#pop#pop', 'Pattern')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\/g?", 0, 0, 0, undef, 0, "#pop#pop", "Pattern")) 0 0 0
502 0 return 1
503 }
504 0 return 0;
505 };
506  
507 sub parsePerlOneLiner {
508 0 ▶ my ($self, $text) = @_;
Subroutine parsePerlOneLiner: not called CC=18 SCAR=58.3
Pod undocumented
509 # String => 'keywords'
510 # attribute => 'Keyword'
511 # context => '#stay'
512 # type => 'keyword'
513 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
514 0 return 1
515 }
516 # attribute => 'Octal'
517 # context => '#stay'
518 # type => 'HlCOct'
519 0 ▶ if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCOct($text, 0, undef, 0, "#stay", "Octal")) 0 0 0
520 0 return 1
521 }
522 # attribute => 'Hex'
523 # context => '#stay'
524 # type => 'HlCHex'
525 0 ▶ if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCHex($text, 0, undef, 0, "#stay", "Hex")) 0 0 0
526 0 return 1
527 }
528 # attribute => 'Decimal'
529 # context => '#stay'
530 # type => 'Int'
531 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
532 0 return 1
533 }
534 # attribute => 'Char'
535 # context => '#stay'
536 # type => 'HlCChar'
537 0 ▶ if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCChar($text, 0, undef, 0, "#stay", "Char")) 0 0 0
538 0 return 1
539 }
540 # String => '^#!.*'
541 # attribute => 'Keyword'
542 # context => '#stay'
543 # type => 'RegExpr'
544 0 ▶ if ($self->testRegExpr($text, '^#!.*', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "^#!.*", 0, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
545 0 return 1
546 }
547 # String => '"[^"]*"'
548 # attribute => 'String'
549 # context => '#stay'
550 # type => 'RegExpr'
551 0 ▶ if ($self->testRegExpr($text, '"[^"]*"', 0, 0, 0, undef, 0, '#stay', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\"[^\"]*\"", 0, 0, 0, undef, 0, "#stay", "String")) 0 0 0
552 0 return 1
553 }
554 # String => ''[^']*''
555 # attribute => 'String'
556 # context => '#stay'
557 # type => 'RegExpr'
558 0 ▶ if ($self->testRegExpr($text, '\'[^\']*\'', 0, 0, 0, undef, 0, '#stay', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "'[^']*'", 0, 0, 0, undef, 0, "#stay", "String")) 0 0 0
559 0 return 1
560 }
561 # attribute => 'String Char'
562 # char => '`'
563 # context => 'Something'
564 # type => 'DetectChar'
565 0 ▶ if ($self->testDetectChar($text, '`', 0, 0, 0, undef, 0, 'Something', 'String Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "`", 0, 0, 0, undef, 0, "Something", "String Char")) 0 0 0
566 0 return 1
567 }
568 # attribute => 'Comment'
569 # char => '/'
570 # char1 => '/'
571 # context => 'Commentar 1'
572 # type => 'Detect2Chars'
573 0 ▶ if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "/", 0, 0, 0, undef, 0, "Commentar 1", "Comment")) 0 0 0
574 0 return 1
575 }
576 # attribute => 'Comment'
577 # char => '/'
578 # char1 => '*'
579 # context => 'Commentar 2'
580 # type => 'Detect2Chars'
581 0 ▶ if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "*", 0, 0, 0, undef, 0, "Commentar 2", "Comment")) 0 0 0
582 0 return 1
583 }
584 # attribute => 'Pattern'
585 # char => 's'
586 # char1 => '/'
587 # context => 'Pattern2'
588 # type => 'Detect2Chars'
589 0 ▶ if ($self->testDetect2Chars($text, 's', '/', 0, 0, 0, undef, 0, 'Pattern2', 'Pattern')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "s", "/", 0, 0, 0, undef, 0, "Pattern2", "Pattern")) 0 0 0
590 0 return 1
591 }
592 # String => '!%&()+,-<=>?[]^{|}~'
593 # attribute => 'Symbol'
594 # context => '#stay'
595 # type => 'AnyChar'
596 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
597 0 return 1
598 }
599 # String => '\$[0-9]+'
600 # attribute => 'Decimal'
601 # context => '#stay'
602 # type => 'RegExpr'
603 0 ▶ if ($self->testRegExpr($text, '\\$[0-9]+', 0, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\\$[0-9]+", 0, 0, 0, undef, 0, "#stay", "Decimal")) 0 0 0
604 0 return 1
605 }
606 # String => '\$\#?[a-zA-Z_]+[a-zA-Z0-9_]*'
607 # attribute => 'Data Type'
608 # context => '#stay'
609 # type => 'RegExpr'
610 0 ▶ if ($self->testRegExpr($text, '\\$\\#?[a-zA-Z_]+[a-zA-Z0-9_]*', 0, 0, 0, undef, 0, '#stay', 'Data Type')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\\$\\#?[a-zA-Z_]+[a-zA-Z0-9_]*", 0, 0, 0, undef, 0, "#stay", "Data Type")) 0 0 0
611 0 return 1
612 }
613 # String => '\s+\:'
614 # attribute => 'Pattern'
615 # context => '#stay'
616 # type => 'RegExpr'
617 0 ▶ if ($self->testRegExpr($text, '\\s+\\:', 0, 0, 0, undef, 0, '#stay', 'Pattern')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\s+\\:", 0, 0, 0, undef, 0, "#stay", "Pattern")) 0 0 0
618 0 return 1
619 }
620 # String => '\#.*'
621 # attribute => 'Comment'
622 # context => '#stay'
623 # type => 'RegExpr'
624 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
625 0 return 1
626 }
627 0 return 0;
628 };
629  
630 sub parseSomething {
631 0 ▶ my ($self, $text) = @_;
Subroutine parseSomething: not called CC=2 SCAR=17.9
Pod undocumented
632 # attribute => 'String Char'
633 # char => '`'
634 # context => '#pop'
635 # type => 'DetectChar'
636 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
637 0 return 1
638 }
639 0 return 0;
640 };
641  
642 sub parseString {
643 0 ▶ my ($self, $text) = @_;
Subroutine parseString: not called CC=6 SCAR=37.4
Pod undocumented
644 # attribute => 'String'
645 # context => '#stay'
646 # type => 'LineContinue'
647 0 ▶ if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testLineContinue($text, 0, undef, 0, "#stay", "String")) 0 0 0
648 0 return 1
649 }
650 # attribute => 'String Char'
651 # context => '#stay'
652 # type => 'HlCStringChar'
653 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
654 0 return 1
655 }
656 # attribute => 'String'
657 # char => '"'
658 # context => '#pop'
659 # type => 'DetectChar'
660 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
661 0 return 1
662 }
663 # String => '\$[0-9]+'
664 # attribute => 'Decimal'
665 # context => '#stay'
666 # type => 'RegExpr'
667 0 ▶ if ($self->testRegExpr($text, '\\$[0-9]+', 0, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\\$[0-9]+", 0, 0, 0, undef, 0, "#stay", "Decimal")) 0 0 0
668 0 return 1
669 }
670 # String => '\$[a-zA-Z_]*[a-zA-Z0-9_]*'
671 # attribute => 'Data Type'
672 # context => '#stay'
673 # type => 'RegExpr'
674 0 ▶ if ($self->testRegExpr($text, '\\$[a-zA-Z_]*[a-zA-Z0-9_]*', 0, 0, 0, undef, 0, '#stay', 'Data Type')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\\$[a-zA-Z_]*[a-zA-Z0-9_]*", 0, 0, 0, undef, 0, "#stay", "Data Type")) 0 0 0
675 0 return 1
676 }
677 0 return 0;
678 };
679  
680 sub parseString2 {
681 0 ▶ my ($self, $text) = @_;
Subroutine parseString2: not called CC=4 SCAR=30.0
Pod undocumented
682 # attribute => 'String'
683 # context => '#stay'
684 # type => 'LineContinue'
685 0 ▶ if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testLineContinue($text, 0, undef, 0, "#stay", "String")) 0 0 0
686 0 return 1
687 }
688 # attribute => 'String Char'
689 # char => '\'
690 # char1 => '''
691 # context => '#stay'
692 # type => 'Detect2Chars'
693 0 ▶ if ($self->testDetect2Chars($text, '\\', '\'', 0, 0, 0, undef, 0, '#stay', 'String Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "\\", "'", 0, 0, 0, undef, 0, "#stay", "String Char")) 0 0 0
694 0 return 1
695 }
696 # attribute => 'String'
697 # char => '''
698 # context => '#pop'
699 # type => 'DetectChar'
700 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
701 0 return 1
702 }
703 0 return 0;
704 };
705  
706  
707 1 1;
708  
709 __END__
« Kate/Asm6502.pm ↑ Summary Kate/D.pm »