| 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 'uscript.xml' file of the syntax highlight | ||||||||||||||||||||
| 6 | # engine of the kate text editor (http://www.kate-editor.org | ||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | #kate xml version 0.91 | ||||||||||||||||||||
| 9 | #kate version 2.3 | ||||||||||||||||||||
| 10 | #generated: Sun Feb 3 22:02:06 2008, localtime | ||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | package Syntax::Highlight::Engine::Kate::UnrealScript; | ||||||||||||||||||||
| 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
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||
| 23 | 2 | my $self = $class->SUPER::new(@_); | |||||||||||||||||||
| 24 | 2 | $self->attributes({ | |||||||||||||||||||
| 25 | 'Char' => 'Char', | ||||||||||||||||||||
| 26 | 'Comment' => 'Comment', | ||||||||||||||||||||
| 27 | 'Data Type' => 'DataType', | ||||||||||||||||||||
| 28 | 'Decimal' => 'DecVal', | ||||||||||||||||||||
| 29 | 'Float' => 'Float', | ||||||||||||||||||||
| 30 | 'Hex' => 'BaseN', | ||||||||||||||||||||
| 31 | 'Keyword' => 'Keyword', | ||||||||||||||||||||
| 32 | 'Normal Text' => 'Normal', | ||||||||||||||||||||
| 33 | 'Octal' => 'BaseN', | ||||||||||||||||||||
| 34 | 'Preprocessor' => 'Others', | ||||||||||||||||||||
| 35 | 'Region Marker' => 'RegionMarker', | ||||||||||||||||||||
| 36 | 'String' => 'String', | ||||||||||||||||||||
| 37 | 'String Char' => 'Char', | ||||||||||||||||||||
| 38 | 'Symbol' => 'Normal', | ||||||||||||||||||||
| 39 | }); | ||||||||||||||||||||
| 40 | 2 | $self->listAdd('keywords', | |||||||||||||||||||
| 41 | 'Cross', | ||||||||||||||||||||
| 42 | 'Dot', | ||||||||||||||||||||
| 43 | 'Static', | ||||||||||||||||||||
| 44 | 'abstract', | ||||||||||||||||||||
| 45 | 'array', | ||||||||||||||||||||
| 46 | 'auto', | ||||||||||||||||||||
| 47 | 'break', | ||||||||||||||||||||
| 48 | 'case', | ||||||||||||||||||||
| 49 | 'coerce', | ||||||||||||||||||||
| 50 | 'config', | ||||||||||||||||||||
| 51 | 'const', | ||||||||||||||||||||
| 52 | 'continue', | ||||||||||||||||||||
| 53 | 'cpptext', | ||||||||||||||||||||
| 54 | 'default', | ||||||||||||||||||||
| 55 | 'defaultproperties', | ||||||||||||||||||||
| 56 | 'do', | ||||||||||||||||||||
| 57 | 'editconst', | ||||||||||||||||||||
| 58 | 'editinline', | ||||||||||||||||||||
| 59 | 'editinlinenew', | ||||||||||||||||||||
| 60 | 'editinlineuse', | ||||||||||||||||||||
| 61 | 'else', | ||||||||||||||||||||
| 62 | 'enum', | ||||||||||||||||||||
| 63 | 'event', | ||||||||||||||||||||
| 64 | 'exec', | ||||||||||||||||||||
| 65 | 'expands', | ||||||||||||||||||||
| 66 | 'export', | ||||||||||||||||||||
| 67 | 'extends', | ||||||||||||||||||||
| 68 | 'false', | ||||||||||||||||||||
| 69 | 'final', | ||||||||||||||||||||
| 70 | 'final', | ||||||||||||||||||||
| 71 | 'for', | ||||||||||||||||||||
| 72 | 'foreach', | ||||||||||||||||||||
| 73 | 'function', | ||||||||||||||||||||
| 74 | 'global', | ||||||||||||||||||||
| 75 | 'hidecategories', | ||||||||||||||||||||
| 76 | 'if', | ||||||||||||||||||||
| 77 | 'ignores', | ||||||||||||||||||||
| 78 | 'instanceof', | ||||||||||||||||||||
| 79 | 'iterator', | ||||||||||||||||||||
| 80 | 'latent', | ||||||||||||||||||||
| 81 | 'local', | ||||||||||||||||||||
| 82 | 'localized', | ||||||||||||||||||||
| 83 | 'native', | ||||||||||||||||||||
| 84 | 'nativereplication', | ||||||||||||||||||||
| 85 | 'new', | ||||||||||||||||||||
| 86 | 'noexport', | ||||||||||||||||||||
| 87 | 'none', | ||||||||||||||||||||
| 88 | 'null', | ||||||||||||||||||||
| 89 | 'operator', | ||||||||||||||||||||
| 90 | 'optional', | ||||||||||||||||||||
| 91 | 'out', | ||||||||||||||||||||
| 92 | 'placeable', | ||||||||||||||||||||
| 93 | 'postoperator', | ||||||||||||||||||||
| 94 | 'preoperator', | ||||||||||||||||||||
| 95 | 'private', | ||||||||||||||||||||
| 96 | 'protected', | ||||||||||||||||||||
| 97 | 'public', | ||||||||||||||||||||
| 98 | 'reliable', | ||||||||||||||||||||
| 99 | 'replication', | ||||||||||||||||||||
| 100 | 'return', | ||||||||||||||||||||
| 101 | 'self', | ||||||||||||||||||||
| 102 | 'simulated', | ||||||||||||||||||||
| 103 | 'singular', | ||||||||||||||||||||
| 104 | 'state', | ||||||||||||||||||||
| 105 | 'static', | ||||||||||||||||||||
| 106 | 'struct', | ||||||||||||||||||||
| 107 | 'super', | ||||||||||||||||||||
| 108 | 'switch', | ||||||||||||||||||||
| 109 | 'synchronized', | ||||||||||||||||||||
| 110 | 'throws', | ||||||||||||||||||||
| 111 | 'transient', | ||||||||||||||||||||
| 112 | 'true', | ||||||||||||||||||||
| 113 | 'unreliable', | ||||||||||||||||||||
| 114 | 'var', | ||||||||||||||||||||
| 115 | 'virtual', | ||||||||||||||||||||
| 116 | 'volatile', | ||||||||||||||||||||
| 117 | 'while', | ||||||||||||||||||||
| 118 | ); | ||||||||||||||||||||
| 119 | 2 | $self->listAdd('types', | |||||||||||||||||||
| 120 | 'ELightType', | ||||||||||||||||||||
| 121 | 'Pawn', | ||||||||||||||||||||
| 122 | 'actor', | ||||||||||||||||||||
| 123 | 'ammo', | ||||||||||||||||||||
| 124 | 'bool', | ||||||||||||||||||||
| 125 | 'boolean', | ||||||||||||||||||||
| 126 | 'byte', | ||||||||||||||||||||
| 127 | 'char', | ||||||||||||||||||||
| 128 | 'class', | ||||||||||||||||||||
| 129 | 'color', | ||||||||||||||||||||
| 130 | 'coords', | ||||||||||||||||||||
| 131 | 'double', | ||||||||||||||||||||
| 132 | 'float', | ||||||||||||||||||||
| 133 | 'int', | ||||||||||||||||||||
| 134 | 'ipaddr', | ||||||||||||||||||||
| 135 | 'long', | ||||||||||||||||||||
| 136 | 'material', | ||||||||||||||||||||
| 137 | 'name', | ||||||||||||||||||||
| 138 | 'object', | ||||||||||||||||||||
| 139 | 'package', | ||||||||||||||||||||
| 140 | 'plane', | ||||||||||||||||||||
| 141 | 'rotator', | ||||||||||||||||||||
| 142 | 'short', | ||||||||||||||||||||
| 143 | 'sound', | ||||||||||||||||||||
| 144 | 'staticmesh', | ||||||||||||||||||||
| 145 | 'string', | ||||||||||||||||||||
| 146 | 'vector', | ||||||||||||||||||||
| 147 | 'void', | ||||||||||||||||||||
| 148 | ); | ||||||||||||||||||||
| 149 | 2 | $self->contextdata({ | |||||||||||||||||||
| 150 | 'Commentar 1' => { | ||||||||||||||||||||
| 151 | callback => \&parseCommentar1, | ||||||||||||||||||||
| 152 | attribute => 'Comment', | ||||||||||||||||||||
| 153 | lineending => '#pop', | ||||||||||||||||||||
| 154 | }, | ||||||||||||||||||||
| 155 | 'Commentar 2' => { | ||||||||||||||||||||
| 156 | callback => \&parseCommentar2, | ||||||||||||||||||||
| 157 | attribute => 'Comment', | ||||||||||||||||||||
| 158 | }, | ||||||||||||||||||||
| 159 | 'Normal' => { | ||||||||||||||||||||
| 160 | callback => \&parseNormal, | ||||||||||||||||||||
| 161 | attribute => 'Normal Text', | ||||||||||||||||||||
| 162 | }, | ||||||||||||||||||||
| 163 | 'Preprocessor' => { | ||||||||||||||||||||
| 164 | callback => \&parsePreprocessor, | ||||||||||||||||||||
| 165 | attribute => 'Preprocessor', | ||||||||||||||||||||
| 166 | lineending => '#pop', | ||||||||||||||||||||
| 167 | }, | ||||||||||||||||||||
| 168 | 'String' => { | ||||||||||||||||||||
| 169 | callback => \&parseString, | ||||||||||||||||||||
| 170 | attribute => 'String', | ||||||||||||||||||||
| 171 | lineending => '#pop', | ||||||||||||||||||||
| 172 | }, | ||||||||||||||||||||
| 173 | }); | ||||||||||||||||||||
| 174 | 2 | $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); | |||||||||||||||||||
| 175 | 2 | $self->basecontext('Normal'); | |||||||||||||||||||
| 176 | 2 | $self->keywordscase(0); | |||||||||||||||||||
| 177 | 2 | $self->initialize; | |||||||||||||||||||
| 178 | 2 | bless ($self, $class); | |||||||||||||||||||
| 179 | 2 | return $self; | |||||||||||||||||||
| 180 | } | ||||||||||||||||||||
| 181 | |||||||||||||||||||||
| 182 | 0 | ▶ | sub language { | ||||||||||||||||||
|
Subroutine
language: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 183 | 0 | return 'UnrealScript'; | |||||||||||||||||||
| 184 | } | ||||||||||||||||||||
| 185 | |||||||||||||||||||||
| 186 | 712 | ▶ | sub parseCommentar1 { | ||||||||||||||||||
|
Subroutine
parseCommentar1: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 187 | 712 | my ($self, $text) = @_; | |||||||||||||||||||
| 188 | 712 | return 0; | |||||||||||||||||||
| 189 | }; | ||||||||||||||||||||
| 190 | |||||||||||||||||||||
| 191 | 92 | ▶ | sub parseCommentar2 { | ||||||||||||||||||
|
Subroutine
parseCommentar2: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 192 | 92 | my ($self, $text) = @_; | |||||||||||||||||||
| 193 | # attribute => 'Comment' | ||||||||||||||||||||
| 194 | # char => '*' | ||||||||||||||||||||
| 195 | # char1 => '/' | ||||||||||||||||||||
| 196 | # context => '#pop' | ||||||||||||||||||||
| 197 | # endRegion => 'Comment' | ||||||||||||||||||||
| 198 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 199 | 92 | ▶ | if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 200 | 2 | return 1 | |||||||||||||||||||
| 201 | } | ||||||||||||||||||||
| 202 | 90 | return 0; | |||||||||||||||||||
| 203 | }; | ||||||||||||||||||||
| 204 | |||||||||||||||||||||
| 205 | 8524 | ▶ | sub parseNormal { | ||||||||||||||||||
|
Subroutine
parseNormal: called CC=27 SCAR=38.0
Pod
undocumented
| |||||||||||||||||||||
| 206 | 8524 | my ($self, $text) = @_; | |||||||||||||||||||
| 207 | # String => 'keywords' | ||||||||||||||||||||
| 208 | # attribute => 'Keyword' | ||||||||||||||||||||
| 209 | # context => '#stay' | ||||||||||||||||||||
| 210 | # type => 'keyword' | ||||||||||||||||||||
| 211 | 8524 | ▶ | if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 212 | 256 | return 1 | |||||||||||||||||||
| 213 | } | ||||||||||||||||||||
| 214 | # String => 'types' | ||||||||||||||||||||
| 215 | # attribute => 'Data Type' | ||||||||||||||||||||
| 216 | # context => '#stay' | ||||||||||||||||||||
| 217 | # type => 'keyword' | ||||||||||||||||||||
| 218 | 8268 | ▶ | if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 219 | 80 | return 1 | |||||||||||||||||||
| 220 | } | ||||||||||||||||||||
| 221 | # attribute => 'Float' | ||||||||||||||||||||
| 222 | # context => '#stay' | ||||||||||||||||||||
| 223 | # items => 'ARRAY(0x16a9b80)' | ||||||||||||||||||||
| 224 | # type => 'Float' | ||||||||||||||||||||
| 225 | 8188 | ▶ | if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 226 | # String => 'fF' | ||||||||||||||||||||
| 227 | # attribute => 'Float' | ||||||||||||||||||||
| 228 | # context => '#stay' | ||||||||||||||||||||
| 229 | # type => 'AnyChar' | ||||||||||||||||||||
| 230 | 166 | ▶ | if ($self->testAnyChar($text, 'fF', 0, 0, undef, 0, '#stay', 'Float')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 231 | 0 | return 1 | |||||||||||||||||||
| 232 | } | ||||||||||||||||||||
| 233 | } | ||||||||||||||||||||
| 234 | # attribute => 'Octal' | ||||||||||||||||||||
| 235 | # context => '#stay' | ||||||||||||||||||||
| 236 | # type => 'HlCOct' | ||||||||||||||||||||
| 237 | 8188 | ▶ | if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 238 | 0 | return 1 | |||||||||||||||||||
| 239 | } | ||||||||||||||||||||
| 240 | # attribute => 'Hex' | ||||||||||||||||||||
| 241 | # context => '#stay' | ||||||||||||||||||||
| 242 | # type => 'HlCHex' | ||||||||||||||||||||
| 243 | 8188 | ▶ | if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 244 | 0 | return 1 | |||||||||||||||||||
| 245 | } | ||||||||||||||||||||
| 246 | # attribute => 'Decimal' | ||||||||||||||||||||
| 247 | # context => '#stay' | ||||||||||||||||||||
| 248 | # items => 'ARRAY(0x16fe360)' | ||||||||||||||||||||
| 249 | # type => 'Int' | ||||||||||||||||||||
| 250 | 8188 | ▶ | if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 251 | # String => 'ULL' | ||||||||||||||||||||
| 252 | # attribute => 'Decimal' | ||||||||||||||||||||
| 253 | # context => '#stay' | ||||||||||||||||||||
| 254 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 255 | # type => 'StringDetect' | ||||||||||||||||||||
| 256 | 10 | ▶ | if ($self->testStringDetect($text, 'ULL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 257 | 0 | return 1 | |||||||||||||||||||
| 258 | } | ||||||||||||||||||||
| 259 | # String => 'LUL' | ||||||||||||||||||||
| 260 | # attribute => 'Decimal' | ||||||||||||||||||||
| 261 | # context => '#stay' | ||||||||||||||||||||
| 262 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 263 | # type => 'StringDetect' | ||||||||||||||||||||
| 264 | 10 | ▶ | if ($self->testStringDetect($text, 'LUL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 265 | 0 | return 1 | |||||||||||||||||||
| 266 | } | ||||||||||||||||||||
| 267 | # String => 'LLU' | ||||||||||||||||||||
| 268 | # attribute => 'Decimal' | ||||||||||||||||||||
| 269 | # context => '#stay' | ||||||||||||||||||||
| 270 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 271 | # type => 'StringDetect' | ||||||||||||||||||||
| 272 | 10 | ▶ | if ($self->testStringDetect($text, 'LLU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 273 | 0 | return 1 | |||||||||||||||||||
| 274 | } | ||||||||||||||||||||
| 275 | # String => 'UL' | ||||||||||||||||||||
| 276 | # attribute => 'Decimal' | ||||||||||||||||||||
| 277 | # context => '#stay' | ||||||||||||||||||||
| 278 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 279 | # type => 'StringDetect' | ||||||||||||||||||||
| 280 | 10 | ▶ | if ($self->testStringDetect($text, 'UL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 281 | 0 | return 1 | |||||||||||||||||||
| 282 | } | ||||||||||||||||||||
| 283 | # String => 'LU' | ||||||||||||||||||||
| 284 | # attribute => 'Decimal' | ||||||||||||||||||||
| 285 | # context => '#stay' | ||||||||||||||||||||
| 286 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 287 | # type => 'StringDetect' | ||||||||||||||||||||
| 288 | 10 | ▶ | if ($self->testStringDetect($text, 'LU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 289 | 0 | return 1 | |||||||||||||||||||
| 290 | } | ||||||||||||||||||||
| 291 | # String => 'LL' | ||||||||||||||||||||
| 292 | # attribute => 'Decimal' | ||||||||||||||||||||
| 293 | # context => '#stay' | ||||||||||||||||||||
| 294 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 295 | # type => 'StringDetect' | ||||||||||||||||||||
| 296 | 10 | ▶ | if ($self->testStringDetect($text, 'LL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 297 | 0 | return 1 | |||||||||||||||||||
| 298 | } | ||||||||||||||||||||
| 299 | # String => 'U' | ||||||||||||||||||||
| 300 | # attribute => 'Decimal' | ||||||||||||||||||||
| 301 | # context => '#stay' | ||||||||||||||||||||
| 302 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 303 | # type => 'StringDetect' | ||||||||||||||||||||
| 304 | 10 | ▶ | if ($self->testStringDetect($text, 'U', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 305 | 0 | return 1 | |||||||||||||||||||
| 306 | } | ||||||||||||||||||||
| 307 | # String => 'L' | ||||||||||||||||||||
| 308 | # attribute => 'Decimal' | ||||||||||||||||||||
| 309 | # context => '#stay' | ||||||||||||||||||||
| 310 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 311 | # type => 'StringDetect' | ||||||||||||||||||||
| 312 | 10 | ▶ | if ($self->testStringDetect($text, 'L', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 313 | 0 | return 1 | |||||||||||||||||||
| 314 | } | ||||||||||||||||||||
| 315 | } | ||||||||||||||||||||
| 316 | # attribute => 'Char' | ||||||||||||||||||||
| 317 | # context => '#stay' | ||||||||||||||||||||
| 318 | # type => 'HlCChar' | ||||||||||||||||||||
| 319 | 8188 | ▶ | if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 320 | 0 | return 1 | |||||||||||||||||||
| 321 | } | ||||||||||||||||||||
| 322 | # String => '//BEGIN.*$' | ||||||||||||||||||||
| 323 | # attribute => 'Region Marker' | ||||||||||||||||||||
| 324 | # beginRegion => 'Region1' | ||||||||||||||||||||
| 325 | # context => '#stay' | ||||||||||||||||||||
| 326 | # type => 'RegExpr' | ||||||||||||||||||||
| 327 | 8188 | ▶ | if ($self->testRegExpr($text, '//BEGIN.*$', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 328 | 0 | return 1 | |||||||||||||||||||
| 329 | } | ||||||||||||||||||||
| 330 | # String => '//END.*$' | ||||||||||||||||||||
| 331 | # attribute => 'Region Marker' | ||||||||||||||||||||
| 332 | # context => '#stay' | ||||||||||||||||||||
| 333 | # endRegion => 'Region1' | ||||||||||||||||||||
| 334 | # type => 'RegExpr' | ||||||||||||||||||||
| 335 | 8188 | ▶ | if ($self->testRegExpr($text, '//END.*$', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 336 | 0 | return 1 | |||||||||||||||||||
| 337 | } | ||||||||||||||||||||
| 338 | # attribute => 'String' | ||||||||||||||||||||
| 339 | # char => '"' | ||||||||||||||||||||
| 340 | # context => 'String' | ||||||||||||||||||||
| 341 | # type => 'DetectChar' | ||||||||||||||||||||
| 342 | 8188 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 343 | 6 | return 1 | |||||||||||||||||||
| 344 | } | ||||||||||||||||||||
| 345 | # attribute => 'String' | ||||||||||||||||||||
| 346 | # char => ''' | ||||||||||||||||||||
| 347 | # context => 'String' | ||||||||||||||||||||
| 348 | # type => 'DetectChar' | ||||||||||||||||||||
| 349 | 8182 | ▶ | if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'String', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 350 | 22 | return 1 | |||||||||||||||||||
| 351 | } | ||||||||||||||||||||
| 352 | # attribute => 'Comment' | ||||||||||||||||||||
| 353 | # char => '/' | ||||||||||||||||||||
| 354 | # char1 => '/' | ||||||||||||||||||||
| 355 | # context => 'Commentar 1' | ||||||||||||||||||||
| 356 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 357 | 8160 | ▶ | if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 358 | 18 | return 1 | |||||||||||||||||||
| 359 | } | ||||||||||||||||||||
| 360 | # attribute => 'Comment' | ||||||||||||||||||||
| 361 | # beginRegion => 'Comment' | ||||||||||||||||||||
| 362 | # char => '/' | ||||||||||||||||||||
| 363 | # char1 => '*' | ||||||||||||||||||||
| 364 | # context => 'Commentar 2' | ||||||||||||||||||||
| 365 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 366 | 8142 | ▶ | if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 367 | 2 | return 1 | |||||||||||||||||||
| 368 | } | ||||||||||||||||||||
| 369 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 370 | # beginRegion => 'Brace1' | ||||||||||||||||||||
| 371 | # char => '{' | ||||||||||||||||||||
| 372 | # context => '#stay' | ||||||||||||||||||||
| 373 | # type => 'DetectChar' | ||||||||||||||||||||
| 374 | 8140 | ▶ | if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 375 | 58 | return 1 | |||||||||||||||||||
| 376 | } | ||||||||||||||||||||
| 377 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 378 | # char => '}' | ||||||||||||||||||||
| 379 | # context => '#stay' | ||||||||||||||||||||
| 380 | # endRegion => 'Brace1' | ||||||||||||||||||||
| 381 | # type => 'DetectChar' | ||||||||||||||||||||
| 382 | 8082 | ▶ | if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 383 | 58 | return 1 | |||||||||||||||||||
| 384 | } | ||||||||||||||||||||
| 385 | # String => '!%&()+,-<=>?[]^{|}~' | ||||||||||||||||||||
| 386 | # attribute => 'Symbol' | ||||||||||||||||||||
| 387 | # context => '#stay' | ||||||||||||||||||||
| 388 | # type => 'AnyChar' | ||||||||||||||||||||
| 389 | 8024 | ▶ | if ($self->testAnyChar($text, '!%&()+,-<=>?[]^{|}~', 0, 0, undef, 0, '#stay', 'Symbol')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 390 | 954 | return 1 | |||||||||||||||||||
| 391 | } | ||||||||||||||||||||
| 392 | # String => '#exec' | ||||||||||||||||||||
| 393 | # attribute => 'Preprocessor' | ||||||||||||||||||||
| 394 | # context => 'Preprocessor' | ||||||||||||||||||||
| 395 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 396 | # type => 'RegExpr' | ||||||||||||||||||||
| 397 | 7070 | ▶ | if ($self->testRegExpr($text, '#exec', 1, 0, 0, undef, 0, 'Preprocessor', 'Preprocessor')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 398 | 0 | return 1 | |||||||||||||||||||
| 399 | } | ||||||||||||||||||||
| 400 | 7070 | return 0; | |||||||||||||||||||
| 401 | }; | ||||||||||||||||||||
| 402 | |||||||||||||||||||||
| 403 | 0 | ▶ | sub parsePreprocessor { | ||||||||||||||||||
|
Subroutine
parsePreprocessor: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 404 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 405 | # attribute => 'Comment' | ||||||||||||||||||||
| 406 | # char => '/' | ||||||||||||||||||||
| 407 | # char1 => '/' | ||||||||||||||||||||
| 408 | # context => 'Commentar 1' | ||||||||||||||||||||
| 409 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 410 | 0 | ▶ | if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 411 | 0 | return 1 | |||||||||||||||||||
| 412 | } | ||||||||||||||||||||
| 413 | # attribute => 'Comment' | ||||||||||||||||||||
| 414 | # char => '/' | ||||||||||||||||||||
| 415 | # char1 => '*' | ||||||||||||||||||||
| 416 | # context => 'Commentar 2' | ||||||||||||||||||||
| 417 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 418 | 0 | ▶ | if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 419 | 0 | return 1 | |||||||||||||||||||
| 420 | } | ||||||||||||||||||||
| 421 | 0 | return 0; | |||||||||||||||||||
| 422 | }; | ||||||||||||||||||||
| 423 | |||||||||||||||||||||
| 424 | 526 | ▶ | sub parseString { | ||||||||||||||||||
|
Subroutine
parseString: called CC=5 SCAR=16.6
Pod
undocumented
| |||||||||||||||||||||
| 425 | 526 | my ($self, $text) = @_; | |||||||||||||||||||
| 426 | # attribute => 'String' | ||||||||||||||||||||
| 427 | # context => '#stay' | ||||||||||||||||||||
| 428 | # type => 'LineContinue' | ||||||||||||||||||||
| 429 | 526 | ▶ | if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 430 | 0 | return 1 | |||||||||||||||||||
| 431 | } | ||||||||||||||||||||
| 432 | # attribute => 'String Char' | ||||||||||||||||||||
| 433 | # context => '#stay' | ||||||||||||||||||||
| 434 | # type => 'HlCStringChar' | ||||||||||||||||||||
| 435 | 526 | ▶ | if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 436 | 0 | return 1 | |||||||||||||||||||
| 437 | } | ||||||||||||||||||||
| 438 | # attribute => 'String' | ||||||||||||||||||||
| 439 | # char => '"' | ||||||||||||||||||||
| 440 | # context => '#pop' | ||||||||||||||||||||
| 441 | # type => 'DetectChar' | ||||||||||||||||||||
| 442 | 526 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 443 | 6 | return 1 | |||||||||||||||||||
| 444 | } | ||||||||||||||||||||
| 445 | # attribute => 'String' | ||||||||||||||||||||
| 446 | # char => ''' | ||||||||||||||||||||
| 447 | # context => '#pop' | ||||||||||||||||||||
| 448 | # type => 'DetectChar' | ||||||||||||||||||||
| 449 | 520 | ▶ | if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 450 | 22 | return 1 | |||||||||||||||||||
| 451 | } | ||||||||||||||||||||
| 452 | 498 | return 0; | |||||||||||||||||||
| 453 | }; | ||||||||||||||||||||
| 454 | |||||||||||||||||||||
| 455 | |||||||||||||||||||||
| 456 | 1 | 1; | |||||||||||||||||||
| 457 | |||||||||||||||||||||
| 458 | __END__ | ||||||||||||||||||||