| 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.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 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||
| 21 | 1 | my $proto = shift; | |||||||||||||||||||
| 22 | 1 | ▶ | my $class = ref($proto) || $proto; | ||||||||||||||||||
|
Condition33%1/3
ref $proto || $proto
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||
| 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 | 0 | ▶ | sub language { | ||||||||||||||||||
|
Subroutine
language: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 169 | 0 | return 'Mason'; | |||||||||||||||||||
| 170 | } | ||||||||||||||||||||
| 171 | |||||||||||||||||||||
| 172 | 0 | ▶ | sub parseCommentar1 { | ||||||||||||||||||
|
Subroutine
parseCommentar1: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 173 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 174 | 0 | return 0; | |||||||||||||||||||
| 175 | }; | ||||||||||||||||||||
| 176 | |||||||||||||||||||||
| 177 | 0 | ▶ | sub parseCommentar2 { | ||||||||||||||||||
|
Subroutine
parseCommentar2: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 178 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 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
| |||||||||||||||||||||
| 185 | 0 | return 1 | |||||||||||||||||||
| 186 | } | ||||||||||||||||||||
| 187 | 0 | return 0; | |||||||||||||||||||
| 188 | }; | ||||||||||||||||||||
| 189 | |||||||||||||||||||||
| 190 | 0 | ▶ | sub parseDocumentation { | ||||||||||||||||||
|
Subroutine
parseDocumentation: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 191 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 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
| |||||||||||||||||||||
| 198 | 0 | return 1 | |||||||||||||||||||
| 199 | } | ||||||||||||||||||||
| 200 | 0 | return 0; | |||||||||||||||||||
| 201 | }; | ||||||||||||||||||||
| 202 | |||||||||||||||||||||
| 203 | 0 | ▶ | sub parseEmbeddedPerl { | ||||||||||||||||||
|
Subroutine
parseEmbeddedPerl: not called CC=22 SCAR=62.3
Pod
undocumented
| |||||||||||||||||||||
| 204 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 352 | 0 | return 1 | |||||||||||||||||||
| 353 | } | ||||||||||||||||||||
| 354 | 0 | return 0; | |||||||||||||||||||
| 355 | }; | ||||||||||||||||||||
| 356 | |||||||||||||||||||||
| 357 | 0 | ▶ | sub parseHTML { | ||||||||||||||||||
|
Subroutine
parseHTML: not called CC=8 SCAR=42.8
Pod
undocumented
| |||||||||||||||||||||
| 358 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 411 | 0 | return 1 | |||||||||||||||||||
| 412 | } | ||||||||||||||||||||
| 413 | 0 | return 0; | |||||||||||||||||||
| 414 | }; | ||||||||||||||||||||
| 415 | |||||||||||||||||||||
| 416 | 0 | ▶ | sub parseMethodCall { | ||||||||||||||||||
|
Subroutine
parseMethodCall: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 417 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 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
| |||||||||||||||||||||
| 424 | 0 | return 1 | |||||||||||||||||||
| 425 | } | ||||||||||||||||||||
| 426 | 0 | return 0; | |||||||||||||||||||
| 427 | }; | ||||||||||||||||||||
| 428 | |||||||||||||||||||||
| 429 | 0 | ▶ | sub parsePattern { | ||||||||||||||||||
|
Subroutine
parsePattern: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 430 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 450 | 0 | return 1 | |||||||||||||||||||
| 451 | } | ||||||||||||||||||||
| 452 | 0 | return 0; | |||||||||||||||||||
| 453 | }; | ||||||||||||||||||||
| 454 | |||||||||||||||||||||
| 455 | 0 | ▶ | sub parsePattern2 { | ||||||||||||||||||
|
Subroutine
parsePattern2: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 456 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 476 | 0 | return 1 | |||||||||||||||||||
| 477 | } | ||||||||||||||||||||
| 478 | 0 | return 0; | |||||||||||||||||||
| 479 | }; | ||||||||||||||||||||
| 480 | |||||||||||||||||||||
| 481 | 0 | ▶ | sub parsePattern3 { | ||||||||||||||||||
|
Subroutine
parsePattern3: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 482 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 502 | 0 | return 1 | |||||||||||||||||||
| 503 | } | ||||||||||||||||||||
| 504 | 0 | return 0; | |||||||||||||||||||
| 505 | }; | ||||||||||||||||||||
| 506 | |||||||||||||||||||||
| 507 | 0 | ▶ | sub parsePerlOneLiner { | ||||||||||||||||||
|
Subroutine
parsePerlOneLiner: not called CC=18 SCAR=58.3
Pod
undocumented
| |||||||||||||||||||||
| 508 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 625 | 0 | return 1 | |||||||||||||||||||
| 626 | } | ||||||||||||||||||||
| 627 | 0 | return 0; | |||||||||||||||||||
| 628 | }; | ||||||||||||||||||||
| 629 | |||||||||||||||||||||
| 630 | 0 | ▶ | sub parseSomething { | ||||||||||||||||||
|
Subroutine
parseSomething: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 631 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 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
| |||||||||||||||||||||
| 637 | 0 | return 1 | |||||||||||||||||||
| 638 | } | ||||||||||||||||||||
| 639 | 0 | return 0; | |||||||||||||||||||
| 640 | }; | ||||||||||||||||||||
| 641 | |||||||||||||||||||||
| 642 | 0 | ▶ | sub parseString { | ||||||||||||||||||
|
Subroutine
parseString: not called CC=6 SCAR=37.4
Pod
undocumented
| |||||||||||||||||||||
| 643 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 644 | # attribute => 'String' | ||||||||||||||||||||
| 645 | # context => '#stay' | ||||||||||||||||||||
| 646 | # type => 'LineContinue' | ||||||||||||||||||||
| 647 | 0 | ▶ | if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 675 | 0 | return 1 | |||||||||||||||||||
| 676 | } | ||||||||||||||||||||
| 677 | 0 | return 0; | |||||||||||||||||||
| 678 | }; | ||||||||||||||||||||
| 679 | |||||||||||||||||||||
| 680 | 0 | ▶ | sub parseString2 { | ||||||||||||||||||
|
Subroutine
parseString2: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 681 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 682 | # attribute => 'String' | ||||||||||||||||||||
| 683 | # context => '#stay' | ||||||||||||||||||||
| 684 | # type => 'LineContinue' | ||||||||||||||||||||
| 685 | 0 | ▶ | if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 701 | 0 | return 1 | |||||||||||||||||||
| 702 | } | ||||||||||||||||||||
| 703 | 0 | return 0; | |||||||||||||||||||
| 704 | }; | ||||||||||||||||||||
| 705 | |||||||||||||||||||||
| 706 | |||||||||||||||||||||
| 707 | 1 | 1; | |||||||||||||||||||
| 708 | |||||||||||||||||||||
| 709 | __END__ | ||||||||||||||||||||