| 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 'cpp.xml' file of the syntax highlight | ||||||||||||||||||||
| 6 | # engine of the kate text editor (http://www.kate-editor.org | ||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | #kate xml version 1.37 | ||||||||||||||||||||
| 9 | #kate version 2.4 | ||||||||||||||||||||
| 10 | #generated: Sun Feb 3 22:02:04 2008, localtime | ||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | package Syntax::Highlight::Engine::Kate::Cplusplus; | ||||||||||||||||||||
| 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 | 4 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||
| 21 | 4 | my $proto = shift; | |||||||||||||||||||
| 22 | 4 | ▶ | 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 | 4 | my $self = $class->SUPER::new(@_); | |||||||||||||||||||
| 24 | 4 | $self->attributes({ | |||||||||||||||||||
| 25 | 'Char' => 'Char', | ||||||||||||||||||||
| 26 | 'Comment' => 'Comment', | ||||||||||||||||||||
| 27 | 'Data Type' => 'DataType', | ||||||||||||||||||||
| 28 | 'Decimal' => 'DecVal', | ||||||||||||||||||||
| 29 | 'Extensions' => 'Keyword', | ||||||||||||||||||||
| 30 | 'Float' => 'Float', | ||||||||||||||||||||
| 31 | 'Hex' => 'BaseN', | ||||||||||||||||||||
| 32 | 'Keyword' => 'Keyword', | ||||||||||||||||||||
| 33 | 'Normal Text' => 'Normal', | ||||||||||||||||||||
| 34 | 'Octal' => 'BaseN', | ||||||||||||||||||||
| 35 | 'Prep. Lib' => 'Others', | ||||||||||||||||||||
| 36 | 'Preprocessor' => 'Others', | ||||||||||||||||||||
| 37 | 'Region Marker' => 'RegionMarker', | ||||||||||||||||||||
| 38 | 'String' => 'String', | ||||||||||||||||||||
| 39 | 'String Char' => 'Char', | ||||||||||||||||||||
| 40 | 'Symbol' => 'Normal', | ||||||||||||||||||||
| 41 | }); | ||||||||||||||||||||
| 42 | 4 | $self->listAdd('extensions', | |||||||||||||||||||
| 43 | 'FALSE', | ||||||||||||||||||||
| 44 | 'K_DCOP', | ||||||||||||||||||||
| 45 | 'Q_ARG', | ||||||||||||||||||||
| 46 | 'Q_ASSERT', | ||||||||||||||||||||
| 47 | 'Q_ASSERT_X', | ||||||||||||||||||||
| 48 | 'Q_CLASSINFO', | ||||||||||||||||||||
| 49 | 'Q_CLEANUP_RESOURCE', | ||||||||||||||||||||
| 50 | 'Q_D', | ||||||||||||||||||||
| 51 | 'Q_DECLARE_FLAGS', | ||||||||||||||||||||
| 52 | 'Q_DECLARE_FLAGS', | ||||||||||||||||||||
| 53 | 'Q_DECLARE_INTERFACE', | ||||||||||||||||||||
| 54 | 'Q_DECLARE_OPERATORS_FOR_FLAGS', | ||||||||||||||||||||
| 55 | 'Q_DECLARE_PRIVATE', | ||||||||||||||||||||
| 56 | 'Q_DECLARE_PUBLIC', | ||||||||||||||||||||
| 57 | 'Q_DECLARE_SHARED', | ||||||||||||||||||||
| 58 | 'Q_DECLARE_TYPEINFO', | ||||||||||||||||||||
| 59 | 'Q_DISABLE_COPY', | ||||||||||||||||||||
| 60 | 'Q_ENUMS', | ||||||||||||||||||||
| 61 | 'Q_EXPORT', | ||||||||||||||||||||
| 62 | 'Q_FLAGS', | ||||||||||||||||||||
| 63 | 'Q_FOREACH', | ||||||||||||||||||||
| 64 | 'Q_FOREVER', | ||||||||||||||||||||
| 65 | 'Q_GADGET', | ||||||||||||||||||||
| 66 | 'Q_GLOBAL_STATIC', | ||||||||||||||||||||
| 67 | 'Q_GLOBAL_STATIC_WITH_ARGS', | ||||||||||||||||||||
| 68 | 'Q_INIT_RESOURCE', | ||||||||||||||||||||
| 69 | 'Q_INTERFACES', | ||||||||||||||||||||
| 70 | 'Q_INVOKABLE', | ||||||||||||||||||||
| 71 | 'Q_OBJECT', | ||||||||||||||||||||
| 72 | 'Q_OVERRIDE', | ||||||||||||||||||||
| 73 | 'Q_PROPERTY', | ||||||||||||||||||||
| 74 | 'Q_Q', | ||||||||||||||||||||
| 75 | 'Q_RETURN_ARG', | ||||||||||||||||||||
| 76 | 'Q_SCRIPTABLE', | ||||||||||||||||||||
| 77 | 'Q_SETS', | ||||||||||||||||||||
| 78 | 'Q_SIGNALS', | ||||||||||||||||||||
| 79 | 'Q_SLOTS', | ||||||||||||||||||||
| 80 | 'SIGNAL', | ||||||||||||||||||||
| 81 | 'SLOT', | ||||||||||||||||||||
| 82 | 'TRUE', | ||||||||||||||||||||
| 83 | 'connect', | ||||||||||||||||||||
| 84 | 'disconnect', | ||||||||||||||||||||
| 85 | 'emit', | ||||||||||||||||||||
| 86 | 'foreach', | ||||||||||||||||||||
| 87 | 'forever', | ||||||||||||||||||||
| 88 | 'signals', | ||||||||||||||||||||
| 89 | 'slots', | ||||||||||||||||||||
| 90 | ); | ||||||||||||||||||||
| 91 | 4 | $self->listAdd('keywords', | |||||||||||||||||||
| 92 | 'and', | ||||||||||||||||||||
| 93 | 'and_eq', | ||||||||||||||||||||
| 94 | 'asm', | ||||||||||||||||||||
| 95 | 'bad_cast', | ||||||||||||||||||||
| 96 | 'bad_typeid', | ||||||||||||||||||||
| 97 | 'bitand', | ||||||||||||||||||||
| 98 | 'bitor', | ||||||||||||||||||||
| 99 | 'break', | ||||||||||||||||||||
| 100 | 'case', | ||||||||||||||||||||
| 101 | 'catch', | ||||||||||||||||||||
| 102 | 'class', | ||||||||||||||||||||
| 103 | 'compl', | ||||||||||||||||||||
| 104 | 'const_cast', | ||||||||||||||||||||
| 105 | 'continue', | ||||||||||||||||||||
| 106 | 'default', | ||||||||||||||||||||
| 107 | 'delete', | ||||||||||||||||||||
| 108 | 'do', | ||||||||||||||||||||
| 109 | 'dynamic_cast', | ||||||||||||||||||||
| 110 | 'else', | ||||||||||||||||||||
| 111 | 'enum', | ||||||||||||||||||||
| 112 | 'except', | ||||||||||||||||||||
| 113 | 'explicit', | ||||||||||||||||||||
| 114 | 'export', | ||||||||||||||||||||
| 115 | 'extern', | ||||||||||||||||||||
| 116 | 'false', | ||||||||||||||||||||
| 117 | 'finally', | ||||||||||||||||||||
| 118 | 'for', | ||||||||||||||||||||
| 119 | 'friend', | ||||||||||||||||||||
| 120 | 'goto', | ||||||||||||||||||||
| 121 | 'if', | ||||||||||||||||||||
| 122 | 'inline', | ||||||||||||||||||||
| 123 | 'namespace', | ||||||||||||||||||||
| 124 | 'new', | ||||||||||||||||||||
| 125 | 'not', | ||||||||||||||||||||
| 126 | 'not_eq', | ||||||||||||||||||||
| 127 | 'operator', | ||||||||||||||||||||
| 128 | 'or', | ||||||||||||||||||||
| 129 | 'or_eq', | ||||||||||||||||||||
| 130 | 'private', | ||||||||||||||||||||
| 131 | 'protected', | ||||||||||||||||||||
| 132 | 'public', | ||||||||||||||||||||
| 133 | 'qobject_cast', | ||||||||||||||||||||
| 134 | 'reinterpret_cast', | ||||||||||||||||||||
| 135 | 'return', | ||||||||||||||||||||
| 136 | 'sizeof', | ||||||||||||||||||||
| 137 | 'static_cast', | ||||||||||||||||||||
| 138 | 'struct', | ||||||||||||||||||||
| 139 | 'switch', | ||||||||||||||||||||
| 140 | 'template', | ||||||||||||||||||||
| 141 | 'this', | ||||||||||||||||||||
| 142 | 'throw', | ||||||||||||||||||||
| 143 | 'true', | ||||||||||||||||||||
| 144 | 'try', | ||||||||||||||||||||
| 145 | 'type_info', | ||||||||||||||||||||
| 146 | 'typedef', | ||||||||||||||||||||
| 147 | 'typeid', | ||||||||||||||||||||
| 148 | 'typename', | ||||||||||||||||||||
| 149 | 'union', | ||||||||||||||||||||
| 150 | 'using', | ||||||||||||||||||||
| 151 | 'virtual', | ||||||||||||||||||||
| 152 | 'while', | ||||||||||||||||||||
| 153 | 'xalloc', | ||||||||||||||||||||
| 154 | 'xor', | ||||||||||||||||||||
| 155 | 'xor_eq', | ||||||||||||||||||||
| 156 | ); | ||||||||||||||||||||
| 157 | 4 | $self->listAdd('types', | |||||||||||||||||||
| 158 | 'auto', | ||||||||||||||||||||
| 159 | 'bool', | ||||||||||||||||||||
| 160 | 'char', | ||||||||||||||||||||
| 161 | 'const', | ||||||||||||||||||||
| 162 | 'double', | ||||||||||||||||||||
| 163 | 'float', | ||||||||||||||||||||
| 164 | 'int', | ||||||||||||||||||||
| 165 | 'int16_t', | ||||||||||||||||||||
| 166 | 'int32_t', | ||||||||||||||||||||
| 167 | 'int64_t', | ||||||||||||||||||||
| 168 | 'int8_t', | ||||||||||||||||||||
| 169 | 'long', | ||||||||||||||||||||
| 170 | 'mutable', | ||||||||||||||||||||
| 171 | 'register', | ||||||||||||||||||||
| 172 | 'short', | ||||||||||||||||||||
| 173 | 'signed', | ||||||||||||||||||||
| 174 | 'static', | ||||||||||||||||||||
| 175 | 'uchar', | ||||||||||||||||||||
| 176 | 'uint', | ||||||||||||||||||||
| 177 | 'uint16_t', | ||||||||||||||||||||
| 178 | 'uint32_t', | ||||||||||||||||||||
| 179 | 'uint64_t', | ||||||||||||||||||||
| 180 | 'uint8_t', | ||||||||||||||||||||
| 181 | 'unsigned', | ||||||||||||||||||||
| 182 | 'void', | ||||||||||||||||||||
| 183 | 'volatile', | ||||||||||||||||||||
| 184 | 'wchar_t', | ||||||||||||||||||||
| 185 | ); | ||||||||||||||||||||
| 186 | 4 | $self->contextdata({ | |||||||||||||||||||
| 187 | 'Commentar 1' => { | ||||||||||||||||||||
| 188 | callback => \&parseCommentar1, | ||||||||||||||||||||
| 189 | attribute => 'Comment', | ||||||||||||||||||||
| 190 | lineending => '#pop', | ||||||||||||||||||||
| 191 | }, | ||||||||||||||||||||
| 192 | 'Commentar 2' => { | ||||||||||||||||||||
| 193 | callback => \&parseCommentar2, | ||||||||||||||||||||
| 194 | attribute => 'Comment', | ||||||||||||||||||||
| 195 | }, | ||||||||||||||||||||
| 196 | 'Commentar/Preprocessor' => { | ||||||||||||||||||||
| 197 | callback => \&parseCommentarPreprocessor, | ||||||||||||||||||||
| 198 | attribute => 'Comment', | ||||||||||||||||||||
| 199 | }, | ||||||||||||||||||||
| 200 | 'Define' => { | ||||||||||||||||||||
| 201 | callback => \&parseDefine, | ||||||||||||||||||||
| 202 | attribute => 'Preprocessor', | ||||||||||||||||||||
| 203 | lineending => '#pop', | ||||||||||||||||||||
| 204 | }, | ||||||||||||||||||||
| 205 | 'Normal' => { | ||||||||||||||||||||
| 206 | callback => \&parseNormal, | ||||||||||||||||||||
| 207 | attribute => 'Normal Text', | ||||||||||||||||||||
| 208 | }, | ||||||||||||||||||||
| 209 | 'Outscoped' => { | ||||||||||||||||||||
| 210 | callback => \&parseOutscoped, | ||||||||||||||||||||
| 211 | attribute => 'Comment', | ||||||||||||||||||||
| 212 | }, | ||||||||||||||||||||
| 213 | 'Outscoped intern' => { | ||||||||||||||||||||
| 214 | callback => \&parseOutscopedintern, | ||||||||||||||||||||
| 215 | attribute => 'Comment', | ||||||||||||||||||||
| 216 | }, | ||||||||||||||||||||
| 217 | 'Preprocessor' => { | ||||||||||||||||||||
| 218 | callback => \&parsePreprocessor, | ||||||||||||||||||||
| 219 | attribute => 'Preprocessor', | ||||||||||||||||||||
| 220 | lineending => '#pop', | ||||||||||||||||||||
| 221 | }, | ||||||||||||||||||||
| 222 | 'Region Marker' => { | ||||||||||||||||||||
| 223 | callback => \&parseRegionMarker, | ||||||||||||||||||||
| 224 | attribute => 'Region Marker', | ||||||||||||||||||||
| 225 | lineending => '#pop', | ||||||||||||||||||||
| 226 | }, | ||||||||||||||||||||
| 227 | 'String' => { | ||||||||||||||||||||
| 228 | callback => \&parseString, | ||||||||||||||||||||
| 229 | attribute => 'String', | ||||||||||||||||||||
| 230 | lineending => '#pop', | ||||||||||||||||||||
| 231 | }, | ||||||||||||||||||||
| 232 | }); | ||||||||||||||||||||
| 233 | 4 | $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); | |||||||||||||||||||
| 234 | 4 | $self->basecontext('Normal'); | |||||||||||||||||||
| 235 | 4 | $self->keywordscase(0); | |||||||||||||||||||
| 236 | 4 | $self->initialize; | |||||||||||||||||||
| 237 | 4 | bless ($self, $class); | |||||||||||||||||||
| 238 | 4 | return $self; | |||||||||||||||||||
| 239 | } | ||||||||||||||||||||
| 240 | |||||||||||||||||||||
| 241 | 0 | ▶ | sub language { | ||||||||||||||||||
|
Subroutine
language: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 242 | 0 | return 'C++'; | |||||||||||||||||||
| 243 | } | ||||||||||||||||||||
| 244 | |||||||||||||||||||||
| 245 | 572 | ▶ | sub parseCommentar1 { | ||||||||||||||||||
|
Subroutine
parseCommentar1: called CC=4 SCAR=14.0
Pod
undocumented
| |||||||||||||||||||||
| 246 | 572 | my ($self, $text) = @_; | |||||||||||||||||||
| 247 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 248 | 572 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 249 | 210 | return 1 | |||||||||||||||||||
| 250 | } | ||||||||||||||||||||
| 251 | # context => '##Alerts' | ||||||||||||||||||||
| 252 | # type => 'IncludeRules' | ||||||||||||||||||||
| 253 | 362 | ▶ | if ($self->includePlugin('Alerts', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 254 | 0 | return 1 | |||||||||||||||||||
| 255 | } | ||||||||||||||||||||
| 256 | # type => 'DetectIdentifier' | ||||||||||||||||||||
| 257 | 362 | ▶ | if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 258 | 176 | return 1 | |||||||||||||||||||
| 259 | } | ||||||||||||||||||||
| 260 | 186 | return 0; | |||||||||||||||||||
| 261 | }; | ||||||||||||||||||||
| 262 | |||||||||||||||||||||
| 263 | 222 | ▶ | sub parseCommentar2 { | ||||||||||||||||||
|
Subroutine
parseCommentar2: called CC=5 SCAR=16.1
Pod
undocumented
| |||||||||||||||||||||
| 264 | 222 | my ($self, $text) = @_; | |||||||||||||||||||
| 265 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 266 | 222 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 267 | 96 | return 1 | |||||||||||||||||||
| 268 | } | ||||||||||||||||||||
| 269 | # attribute => 'Comment' | ||||||||||||||||||||
| 270 | # char => '*' | ||||||||||||||||||||
| 271 | # char1 => '/' | ||||||||||||||||||||
| 272 | # context => '#pop' | ||||||||||||||||||||
| 273 | # endRegion => 'Comment' | ||||||||||||||||||||
| 274 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 275 | 126 | ▶ | if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 276 | 18 | return 1 | |||||||||||||||||||
| 277 | } | ||||||||||||||||||||
| 278 | # context => '##Alerts' | ||||||||||||||||||||
| 279 | # type => 'IncludeRules' | ||||||||||||||||||||
| 280 | 108 | ▶ | if ($self->includePlugin('Alerts', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 281 | 4 | return 1 | |||||||||||||||||||
| 282 | } | ||||||||||||||||||||
| 283 | # type => 'DetectIdentifier' | ||||||||||||||||||||
| 284 | 104 | ▶ | if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 285 | 58 | return 1 | |||||||||||||||||||
| 286 | } | ||||||||||||||||||||
| 287 | 46 | return 0; | |||||||||||||||||||
| 288 | }; | ||||||||||||||||||||
| 289 | |||||||||||||||||||||
| 290 | 0 | ▶ | sub parseCommentarPreprocessor { | ||||||||||||||||||
|
Subroutine
parseCommentarPreprocessor: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 291 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 292 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 293 | 0 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 294 | 0 | return 1 | |||||||||||||||||||
| 295 | } | ||||||||||||||||||||
| 296 | # attribute => 'Comment' | ||||||||||||||||||||
| 297 | # char => '*' | ||||||||||||||||||||
| 298 | # char1 => '/' | ||||||||||||||||||||
| 299 | # context => '#pop' | ||||||||||||||||||||
| 300 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 301 | 0 | ▶ | if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 302 | 0 | return 1 | |||||||||||||||||||
| 303 | } | ||||||||||||||||||||
| 304 | # type => 'DetectIdentifier' | ||||||||||||||||||||
| 305 | 0 | ▶ | if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 306 | 0 | return 1 | |||||||||||||||||||
| 307 | } | ||||||||||||||||||||
| 308 | 0 | return 0; | |||||||||||||||||||
| 309 | }; | ||||||||||||||||||||
| 310 | |||||||||||||||||||||
| 311 | 0 | ▶ | sub parseDefine { | ||||||||||||||||||
|
Subroutine
parseDefine: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 312 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 313 | # attribute => 'Preprocessor' | ||||||||||||||||||||
| 314 | # context => '#stay' | ||||||||||||||||||||
| 315 | # type => 'LineContinue' | ||||||||||||||||||||
| 316 | 0 | ▶ | if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Preprocessor')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 317 | 0 | return 1 | |||||||||||||||||||
| 318 | } | ||||||||||||||||||||
| 319 | 0 | return 0; | |||||||||||||||||||
| 320 | }; | ||||||||||||||||||||
| 321 | |||||||||||||||||||||
| 322 | 3738 | ▶ | sub parseNormal { | ||||||||||||||||||
|
Subroutine
parseNormal: called CC=31 SCAR=43.2
Pod
undocumented
| |||||||||||||||||||||
| 323 | 3738 | my ($self, $text) = @_; | |||||||||||||||||||
| 324 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 325 | 3738 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 326 | 1048 | return 1 | |||||||||||||||||||
| 327 | } | ||||||||||||||||||||
| 328 | # String => '#\s*if\s+0' | ||||||||||||||||||||
| 329 | # attribute => 'Preprocessor' | ||||||||||||||||||||
| 330 | # beginRegion => 'Outscoped' | ||||||||||||||||||||
| 331 | # context => 'Outscoped' | ||||||||||||||||||||
| 332 | # firstNonSpace => 'true' | ||||||||||||||||||||
| 333 | # type => 'RegExpr' | ||||||||||||||||||||
| 334 | 2690 | ▶ | if ($self->testRegExpr($text, '#\\s*if\\s+0', 0, 0, 0, undef, 1, 'Outscoped', 'Preprocessor')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 335 | 0 | return 1 | |||||||||||||||||||
| 336 | } | ||||||||||||||||||||
| 337 | # attribute => 'Preprocessor' | ||||||||||||||||||||
| 338 | # char => '#' | ||||||||||||||||||||
| 339 | # context => 'Preprocessor' | ||||||||||||||||||||
| 340 | # firstNonSpace => 'true' | ||||||||||||||||||||
| 341 | # type => 'DetectChar' | ||||||||||||||||||||
| 342 | 2690 | ▶ | if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 1, 'Preprocessor', 'Preprocessor')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 343 | 22 | return 1 | |||||||||||||||||||
| 344 | } | ||||||||||||||||||||
| 345 | # String => '//BEGIN' | ||||||||||||||||||||
| 346 | # attribute => 'Region Marker' | ||||||||||||||||||||
| 347 | # beginRegion => 'Region1' | ||||||||||||||||||||
| 348 | # context => 'Region Marker' | ||||||||||||||||||||
| 349 | # firstNonSpace => 'true' | ||||||||||||||||||||
| 350 | # type => 'StringDetect' | ||||||||||||||||||||
| 351 | 2668 | ▶ | if ($self->testStringDetect($text, '//BEGIN', 0, 0, 0, undef, 1, 'Region Marker', 'Region Marker')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 352 | 16 | return 1 | |||||||||||||||||||
| 353 | } | ||||||||||||||||||||
| 354 | # String => '//END' | ||||||||||||||||||||
| 355 | # attribute => 'Region Marker' | ||||||||||||||||||||
| 356 | # context => 'Region Marker' | ||||||||||||||||||||
| 357 | # endRegion => 'Region1' | ||||||||||||||||||||
| 358 | # firstNonSpace => 'true' | ||||||||||||||||||||
| 359 | # type => 'StringDetect' | ||||||||||||||||||||
| 360 | 2652 | ▶ | if ($self->testStringDetect($text, '//END', 0, 0, 0, undef, 1, 'Region Marker', 'Region Marker')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 361 | 16 | return 1 | |||||||||||||||||||
| 362 | } | ||||||||||||||||||||
| 363 | # String => 'keywords' | ||||||||||||||||||||
| 364 | # attribute => 'Keyword' | ||||||||||||||||||||
| 365 | # context => '#stay' | ||||||||||||||||||||
| 366 | # type => 'keyword' | ||||||||||||||||||||
| 367 | 2636 | ▶ | if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 368 | 146 | return 1 | |||||||||||||||||||
| 369 | } | ||||||||||||||||||||
| 370 | # String => 'extensions' | ||||||||||||||||||||
| 371 | # attribute => 'Extensions' | ||||||||||||||||||||
| 372 | # context => '#stay' | ||||||||||||||||||||
| 373 | # type => 'keyword' | ||||||||||||||||||||
| 374 | 2490 | ▶ | if ($self->testKeyword($text, 'extensions', 0, undef, 0, '#stay', 'Extensions')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 375 | 0 | return 1 | |||||||||||||||||||
| 376 | } | ||||||||||||||||||||
| 377 | # String => 'types' | ||||||||||||||||||||
| 378 | # attribute => 'Data Type' | ||||||||||||||||||||
| 379 | # context => '#stay' | ||||||||||||||||||||
| 380 | # type => 'keyword' | ||||||||||||||||||||
| 381 | 2490 | ▶ | if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 382 | 168 | return 1 | |||||||||||||||||||
| 383 | } | ||||||||||||||||||||
| 384 | # attribute => 'Char' | ||||||||||||||||||||
| 385 | # context => '#stay' | ||||||||||||||||||||
| 386 | # type => 'HlCChar' | ||||||||||||||||||||
| 387 | 2322 | ▶ | if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 388 | 18 | return 1 | |||||||||||||||||||
| 389 | } | ||||||||||||||||||||
| 390 | # attribute => 'String' | ||||||||||||||||||||
| 391 | # char => '"' | ||||||||||||||||||||
| 392 | # context => 'String' | ||||||||||||||||||||
| 393 | # type => 'DetectChar' | ||||||||||||||||||||
| 394 | 2304 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 395 | 36 | return 1 | |||||||||||||||||||
| 396 | } | ||||||||||||||||||||
| 397 | # type => 'DetectIdentifier' | ||||||||||||||||||||
| 398 | 2268 | ▶ | if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 399 | 610 | return 1 | |||||||||||||||||||
| 400 | } | ||||||||||||||||||||
| 401 | # attribute => 'Float' | ||||||||||||||||||||
| 402 | # context => '#stay' | ||||||||||||||||||||
| 403 | # items => 'ARRAY(0x1255cd0)' | ||||||||||||||||||||
| 404 | # type => 'Float' | ||||||||||||||||||||
| 405 | 1658 | ▶ | if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 406 | # String => 'fF' | ||||||||||||||||||||
| 407 | # attribute => 'Float' | ||||||||||||||||||||
| 408 | # context => '#stay' | ||||||||||||||||||||
| 409 | # type => 'AnyChar' | ||||||||||||||||||||
| 410 | 62 | ▶ | if ($self->testAnyChar($text, 'fF', 0, 0, undef, 0, '#stay', 'Float')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 411 | 0 | return 1 | |||||||||||||||||||
| 412 | } | ||||||||||||||||||||
| 413 | } | ||||||||||||||||||||
| 414 | # attribute => 'Octal' | ||||||||||||||||||||
| 415 | # context => '#stay' | ||||||||||||||||||||
| 416 | # type => 'HlCOct' | ||||||||||||||||||||
| 417 | 1658 | ▶ | if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 418 | 0 | return 1 | |||||||||||||||||||
| 419 | } | ||||||||||||||||||||
| 420 | # attribute => 'Hex' | ||||||||||||||||||||
| 421 | # context => '#stay' | ||||||||||||||||||||
| 422 | # type => 'HlCHex' | ||||||||||||||||||||
| 423 | 1658 | ▶ | if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 424 | 0 | return 1 | |||||||||||||||||||
| 425 | } | ||||||||||||||||||||
| 426 | # attribute => 'Decimal' | ||||||||||||||||||||
| 427 | # context => '#stay' | ||||||||||||||||||||
| 428 | # items => 'ARRAY(0x132c920)' | ||||||||||||||||||||
| 429 | # type => 'Int' | ||||||||||||||||||||
| 430 | 1658 | ▶ | if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 431 | # String => 'ULL' | ||||||||||||||||||||
| 432 | # attribute => 'Decimal' | ||||||||||||||||||||
| 433 | # context => '#stay' | ||||||||||||||||||||
| 434 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 435 | # type => 'StringDetect' | ||||||||||||||||||||
| 436 | 0 | ▶ | if ($self->testStringDetect($text, 'ULL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 437 | 0 | return 1 | |||||||||||||||||||
| 438 | } | ||||||||||||||||||||
| 439 | # String => 'LUL' | ||||||||||||||||||||
| 440 | # attribute => 'Decimal' | ||||||||||||||||||||
| 441 | # context => '#stay' | ||||||||||||||||||||
| 442 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 443 | # type => 'StringDetect' | ||||||||||||||||||||
| 444 | 0 | ▶ | if ($self->testStringDetect($text, 'LUL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 445 | 0 | return 1 | |||||||||||||||||||
| 446 | } | ||||||||||||||||||||
| 447 | # String => 'LLU' | ||||||||||||||||||||
| 448 | # attribute => 'Decimal' | ||||||||||||||||||||
| 449 | # context => '#stay' | ||||||||||||||||||||
| 450 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 451 | # type => 'StringDetect' | ||||||||||||||||||||
| 452 | 0 | ▶ | if ($self->testStringDetect($text, 'LLU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 453 | 0 | return 1 | |||||||||||||||||||
| 454 | } | ||||||||||||||||||||
| 455 | # String => 'UL' | ||||||||||||||||||||
| 456 | # attribute => 'Decimal' | ||||||||||||||||||||
| 457 | # context => '#stay' | ||||||||||||||||||||
| 458 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 459 | # type => 'StringDetect' | ||||||||||||||||||||
| 460 | 0 | ▶ | if ($self->testStringDetect($text, 'UL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 461 | 0 | return 1 | |||||||||||||||||||
| 462 | } | ||||||||||||||||||||
| 463 | # String => 'LU' | ||||||||||||||||||||
| 464 | # attribute => 'Decimal' | ||||||||||||||||||||
| 465 | # context => '#stay' | ||||||||||||||||||||
| 466 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 467 | # type => 'StringDetect' | ||||||||||||||||||||
| 468 | 0 | ▶ | if ($self->testStringDetect($text, 'LU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 469 | 0 | return 1 | |||||||||||||||||||
| 470 | } | ||||||||||||||||||||
| 471 | # String => 'LL' | ||||||||||||||||||||
| 472 | # attribute => 'Decimal' | ||||||||||||||||||||
| 473 | # context => '#stay' | ||||||||||||||||||||
| 474 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 475 | # type => 'StringDetect' | ||||||||||||||||||||
| 476 | 0 | ▶ | if ($self->testStringDetect($text, 'LL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 477 | 0 | return 1 | |||||||||||||||||||
| 478 | } | ||||||||||||||||||||
| 479 | # String => 'U' | ||||||||||||||||||||
| 480 | # attribute => 'Decimal' | ||||||||||||||||||||
| 481 | # context => '#stay' | ||||||||||||||||||||
| 482 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 483 | # type => 'StringDetect' | ||||||||||||||||||||
| 484 | 0 | ▶ | if ($self->testStringDetect($text, 'U', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 485 | 0 | return 1 | |||||||||||||||||||
| 486 | } | ||||||||||||||||||||
| 487 | # String => 'L' | ||||||||||||||||||||
| 488 | # attribute => 'Decimal' | ||||||||||||||||||||
| 489 | # context => '#stay' | ||||||||||||||||||||
| 490 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 491 | # type => 'StringDetect' | ||||||||||||||||||||
| 492 | 0 | ▶ | if ($self->testStringDetect($text, 'L', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 493 | 0 | return 1 | |||||||||||||||||||
| 494 | } | ||||||||||||||||||||
| 495 | } | ||||||||||||||||||||
| 496 | # context => '##Doxygen' | ||||||||||||||||||||
| 497 | # type => 'IncludeRules' | ||||||||||||||||||||
| 498 | 1658 | ▶ | if ($self->includePlugin('Doxygen', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 499 | 6 | return 1 | |||||||||||||||||||
| 500 | } | ||||||||||||||||||||
| 501 | # attribute => 'Comment' | ||||||||||||||||||||
| 502 | # char => '/' | ||||||||||||||||||||
| 503 | # char1 => '/' | ||||||||||||||||||||
| 504 | # context => 'Commentar 1' | ||||||||||||||||||||
| 505 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 506 | 1652 | ▶ | if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 507 | 22 | return 1 | |||||||||||||||||||
| 508 | } | ||||||||||||||||||||
| 509 | # attribute => 'Comment' | ||||||||||||||||||||
| 510 | # beginRegion => 'Comment' | ||||||||||||||||||||
| 511 | # char => '/' | ||||||||||||||||||||
| 512 | # char1 => '*' | ||||||||||||||||||||
| 513 | # context => 'Commentar 2' | ||||||||||||||||||||
| 514 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 515 | 1630 | ▶ | if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 516 | 18 | return 1 | |||||||||||||||||||
| 517 | } | ||||||||||||||||||||
| 518 | # attribute => 'Symbol' | ||||||||||||||||||||
| 519 | # beginRegion => 'Brace1' | ||||||||||||||||||||
| 520 | # char => '{' | ||||||||||||||||||||
| 521 | # context => '#stay' | ||||||||||||||||||||
| 522 | # type => 'DetectChar' | ||||||||||||||||||||
| 523 | 1612 | ▶ | if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 524 | 44 | return 1 | |||||||||||||||||||
| 525 | } | ||||||||||||||||||||
| 526 | # attribute => 'Symbol' | ||||||||||||||||||||
| 527 | # char => '}' | ||||||||||||||||||||
| 528 | # context => '#stay' | ||||||||||||||||||||
| 529 | # endRegion => 'Brace1' | ||||||||||||||||||||
| 530 | # type => 'DetectChar' | ||||||||||||||||||||
| 531 | 1568 | ▶ | if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 532 | 44 | return 1 | |||||||||||||||||||
| 533 | } | ||||||||||||||||||||
| 534 | # String => ':!%&()+,-/.*<=>?[]{|}~^;' | ||||||||||||||||||||
| 535 | # attribute => 'Symbol' | ||||||||||||||||||||
| 536 | # context => '#stay' | ||||||||||||||||||||
| 537 | # type => 'AnyChar' | ||||||||||||||||||||
| 538 | 1524 | ▶ | if ($self->testAnyChar($text, ':!%&()+,-/.*<=>?[]{|}~^;', 0, 0, undef, 0, '#stay', 'Symbol')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 539 | 1364 | return 1 | |||||||||||||||||||
| 540 | } | ||||||||||||||||||||
| 541 | 160 | return 0; | |||||||||||||||||||
| 542 | }; | ||||||||||||||||||||
| 543 | |||||||||||||||||||||
| 544 | 0 | ▶ | sub parseOutscoped { | ||||||||||||||||||
|
Subroutine
parseOutscoped: not called CC=10 SCAR=47.0
Pod
undocumented
| |||||||||||||||||||||
| 545 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 546 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 547 | 0 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 548 | 0 | return 1 | |||||||||||||||||||
| 549 | } | ||||||||||||||||||||
| 550 | # context => '##Alerts' | ||||||||||||||||||||
| 551 | # type => 'IncludeRules' | ||||||||||||||||||||
| 552 | 0 | ▶ | if ($self->includePlugin('Alerts', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 553 | 0 | return 1 | |||||||||||||||||||
| 554 | } | ||||||||||||||||||||
| 555 | # type => 'DetectIdentifier' | ||||||||||||||||||||
| 556 | 0 | ▶ | if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 557 | 0 | return 1 | |||||||||||||||||||
| 558 | } | ||||||||||||||||||||
| 559 | # attribute => 'String' | ||||||||||||||||||||
| 560 | # char => '"' | ||||||||||||||||||||
| 561 | # context => 'String' | ||||||||||||||||||||
| 562 | # type => 'DetectChar' | ||||||||||||||||||||
| 563 | 0 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 564 | 0 | return 1 | |||||||||||||||||||
| 565 | } | ||||||||||||||||||||
| 566 | # context => '##Doxygen' | ||||||||||||||||||||
| 567 | # type => 'IncludeRules' | ||||||||||||||||||||
| 568 | 0 | ▶ | if ($self->includePlugin('Doxygen', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 569 | 0 | return 1 | |||||||||||||||||||
| 570 | } | ||||||||||||||||||||
| 571 | # attribute => 'Comment' | ||||||||||||||||||||
| 572 | # char => '/' | ||||||||||||||||||||
| 573 | # char1 => '/' | ||||||||||||||||||||
| 574 | # context => 'Commentar 1' | ||||||||||||||||||||
| 575 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 576 | 0 | ▶ | if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 577 | 0 | return 1 | |||||||||||||||||||
| 578 | } | ||||||||||||||||||||
| 579 | # attribute => 'Comment' | ||||||||||||||||||||
| 580 | # beginRegion => 'Comment' | ||||||||||||||||||||
| 581 | # char => '/' | ||||||||||||||||||||
| 582 | # char1 => '*' | ||||||||||||||||||||
| 583 | # context => 'Commentar 2' | ||||||||||||||||||||
| 584 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 585 | 0 | ▶ | if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 586 | 0 | return 1 | |||||||||||||||||||
| 587 | } | ||||||||||||||||||||
| 588 | # String => '#\s*if' | ||||||||||||||||||||
| 589 | # attribute => 'Comment' | ||||||||||||||||||||
| 590 | # beginRegion => 'Outscoped' | ||||||||||||||||||||
| 591 | # context => 'Outscoped intern' | ||||||||||||||||||||
| 592 | # firstNonSpace => 'true' | ||||||||||||||||||||
| 593 | # type => 'RegExpr' | ||||||||||||||||||||
| 594 | 0 | ▶ | if ($self->testRegExpr($text, '#\\s*if', 0, 0, 0, undef, 1, 'Outscoped intern', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 595 | 0 | return 1 | |||||||||||||||||||
| 596 | } | ||||||||||||||||||||
| 597 | # String => '#\s*(endif|else|elif)' | ||||||||||||||||||||
| 598 | # attribute => 'Preprocessor' | ||||||||||||||||||||
| 599 | # context => '#pop' | ||||||||||||||||||||
| 600 | # endRegion => 'Outscoped' | ||||||||||||||||||||
| 601 | # firstNonSpace => 'true' | ||||||||||||||||||||
| 602 | # type => 'RegExpr' | ||||||||||||||||||||
| 603 | 0 | ▶ | if ($self->testRegExpr($text, '#\\s*(endif|else|elif)', 0, 0, 0, undef, 1, '#pop', 'Preprocessor')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 604 | 0 | return 1 | |||||||||||||||||||
| 605 | } | ||||||||||||||||||||
| 606 | 0 | return 0; | |||||||||||||||||||
| 607 | }; | ||||||||||||||||||||
| 608 | |||||||||||||||||||||
| 609 | 0 | ▶ | sub parseOutscopedintern { | ||||||||||||||||||
|
Subroutine
parseOutscopedintern: not called CC=10 SCAR=47.0
Pod
undocumented
| |||||||||||||||||||||
| 610 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 611 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 612 | 0 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 613 | 0 | return 1 | |||||||||||||||||||
| 614 | } | ||||||||||||||||||||
| 615 | # context => '##Alerts' | ||||||||||||||||||||
| 616 | # type => 'IncludeRules' | ||||||||||||||||||||
| 617 | 0 | ▶ | if ($self->includePlugin('Alerts', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 618 | 0 | return 1 | |||||||||||||||||||
| 619 | } | ||||||||||||||||||||
| 620 | # type => 'DetectIdentifier' | ||||||||||||||||||||
| 621 | 0 | ▶ | if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 622 | 0 | return 1 | |||||||||||||||||||
| 623 | } | ||||||||||||||||||||
| 624 | # attribute => 'String' | ||||||||||||||||||||
| 625 | # char => '"' | ||||||||||||||||||||
| 626 | # context => 'String' | ||||||||||||||||||||
| 627 | # type => 'DetectChar' | ||||||||||||||||||||
| 628 | 0 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 629 | 0 | return 1 | |||||||||||||||||||
| 630 | } | ||||||||||||||||||||
| 631 | # context => '##Doxygen' | ||||||||||||||||||||
| 632 | # type => 'IncludeRules' | ||||||||||||||||||||
| 633 | 0 | ▶ | if ($self->includePlugin('Doxygen', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 634 | 0 | return 1 | |||||||||||||||||||
| 635 | } | ||||||||||||||||||||
| 636 | # attribute => 'Comment' | ||||||||||||||||||||
| 637 | # char => '/' | ||||||||||||||||||||
| 638 | # char1 => '/' | ||||||||||||||||||||
| 639 | # context => 'Commentar 1' | ||||||||||||||||||||
| 640 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 641 | 0 | ▶ | if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 642 | 0 | return 1 | |||||||||||||||||||
| 643 | } | ||||||||||||||||||||
| 644 | # attribute => 'Comment' | ||||||||||||||||||||
| 645 | # beginRegion => 'Comment' | ||||||||||||||||||||
| 646 | # char => '/' | ||||||||||||||||||||
| 647 | # char1 => '*' | ||||||||||||||||||||
| 648 | # context => 'Commentar 2' | ||||||||||||||||||||
| 649 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 650 | 0 | ▶ | if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 651 | 0 | return 1 | |||||||||||||||||||
| 652 | } | ||||||||||||||||||||
| 653 | # String => '#\s*if' | ||||||||||||||||||||
| 654 | # attribute => 'Comment' | ||||||||||||||||||||
| 655 | # beginRegion => 'Outscoped' | ||||||||||||||||||||
| 656 | # context => 'Outscoped intern' | ||||||||||||||||||||
| 657 | # firstNonSpace => 'true' | ||||||||||||||||||||
| 658 | # type => 'RegExpr' | ||||||||||||||||||||
| 659 | 0 | ▶ | if ($self->testRegExpr($text, '#\\s*if', 0, 0, 0, undef, 1, 'Outscoped intern', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 660 | 0 | return 1 | |||||||||||||||||||
| 661 | } | ||||||||||||||||||||
| 662 | # String => '#\s*endif' | ||||||||||||||||||||
| 663 | # attribute => 'Comment' | ||||||||||||||||||||
| 664 | # context => '#pop' | ||||||||||||||||||||
| 665 | # endRegion => 'Outscoped' | ||||||||||||||||||||
| 666 | # firstNonSpace => 'true' | ||||||||||||||||||||
| 667 | # type => 'RegExpr' | ||||||||||||||||||||
| 668 | 0 | ▶ | if ($self->testRegExpr($text, '#\\s*endif', 0, 0, 0, undef, 1, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 669 | 0 | return 1 | |||||||||||||||||||
| 670 | } | ||||||||||||||||||||
| 671 | 0 | return 0; | |||||||||||||||||||
| 672 | }; | ||||||||||||||||||||
| 673 | |||||||||||||||||||||
| 674 | 166 | ▶ | sub parsePreprocessor { | ||||||||||||||||||
|
Subroutine
parsePreprocessor: called CC=9 SCAR=24.0
Pod
undocumented
| |||||||||||||||||||||
| 675 | 166 | my ($self, $text) = @_; | |||||||||||||||||||
| 676 | # attribute => 'Preprocessor' | ||||||||||||||||||||
| 677 | # context => '#stay' | ||||||||||||||||||||
| 678 | # type => 'LineContinue' | ||||||||||||||||||||
| 679 | 166 | ▶ | if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Preprocessor')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 680 | 0 | return 1 | |||||||||||||||||||
| 681 | } | ||||||||||||||||||||
| 682 | # String => 'define.*((?=\\))' | ||||||||||||||||||||
| 683 | # attribute => 'Preprocessor' | ||||||||||||||||||||
| 684 | # context => 'Define' | ||||||||||||||||||||
| 685 | # type => 'RegExpr' | ||||||||||||||||||||
| 686 | 166 | ▶ | if ($self->testRegExpr($text, 'define.*((?=\\\\))', 0, 0, 0, undef, 0, 'Define', 'Preprocessor')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 687 | 0 | return 1 | |||||||||||||||||||
| 688 | } | ||||||||||||||||||||
| 689 | # String => 'define.*' | ||||||||||||||||||||
| 690 | # attribute => 'Preprocessor' | ||||||||||||||||||||
| 691 | # context => '#stay' | ||||||||||||||||||||
| 692 | # type => 'RegExpr' | ||||||||||||||||||||
| 693 | 166 | ▶ | if ($self->testRegExpr($text, 'define.*', 0, 0, 0, undef, 0, '#stay', 'Preprocessor')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 694 | 4 | return 1 | |||||||||||||||||||
| 695 | } | ||||||||||||||||||||
| 696 | # attribute => 'Prep. Lib' | ||||||||||||||||||||
| 697 | # char => '"' | ||||||||||||||||||||
| 698 | # char1 => '"' | ||||||||||||||||||||
| 699 | # context => '#stay' | ||||||||||||||||||||
| 700 | # type => 'RangeDetect' | ||||||||||||||||||||
| 701 | 162 | ▶ | if ($self->testRangeDetect($text, '"', '"', 0, 0, undef, 0, '#stay', 'Prep. Lib')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 702 | 6 | return 1 | |||||||||||||||||||
| 703 | } | ||||||||||||||||||||
| 704 | # attribute => 'Prep. Lib' | ||||||||||||||||||||
| 705 | # char => '<' | ||||||||||||||||||||
| 706 | # char1 => '>' | ||||||||||||||||||||
| 707 | # context => '#stay' | ||||||||||||||||||||
| 708 | # type => 'RangeDetect' | ||||||||||||||||||||
| 709 | 156 | ▶ | if ($self->testRangeDetect($text, '<', '>', 0, 0, undef, 0, '#stay', 'Prep. Lib')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 710 | 12 | return 1 | |||||||||||||||||||
| 711 | } | ||||||||||||||||||||
| 712 | # context => '##Doxygen' | ||||||||||||||||||||
| 713 | # type => 'IncludeRules' | ||||||||||||||||||||
| 714 | 144 | ▶ | if ($self->includePlugin('Doxygen', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 715 | 0 | return 1 | |||||||||||||||||||
| 716 | } | ||||||||||||||||||||
| 717 | # attribute => 'Comment' | ||||||||||||||||||||
| 718 | # char => '/' | ||||||||||||||||||||
| 719 | # char1 => '/' | ||||||||||||||||||||
| 720 | # context => 'Commentar 1' | ||||||||||||||||||||
| 721 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 722 | 144 | ▶ | if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 723 | 0 | return 1 | |||||||||||||||||||
| 724 | } | ||||||||||||||||||||
| 725 | # attribute => 'Comment' | ||||||||||||||||||||
| 726 | # char => '/' | ||||||||||||||||||||
| 727 | # char1 => '*' | ||||||||||||||||||||
| 728 | # context => 'Commentar/Preprocessor' | ||||||||||||||||||||
| 729 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 730 | 144 | ▶ | if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar/Preprocessor', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 731 | 0 | return 1 | |||||||||||||||||||
| 732 | } | ||||||||||||||||||||
| 733 | 144 | return 0; | |||||||||||||||||||
| 734 | }; | ||||||||||||||||||||
| 735 | |||||||||||||||||||||
| 736 | 282 | ▶ | sub parseRegionMarker { | ||||||||||||||||||
|
Subroutine
parseRegionMarker: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 737 | 282 | my ($self, $text) = @_; | |||||||||||||||||||
| 738 | 282 | return 0; | |||||||||||||||||||
| 739 | }; | ||||||||||||||||||||
| 740 | |||||||||||||||||||||
| 741 | 322 | ▶ | sub parseString { | ||||||||||||||||||
|
Subroutine
parseString: called CC=4 SCAR=14.0
Pod
undocumented
| |||||||||||||||||||||
| 742 | 322 | my ($self, $text) = @_; | |||||||||||||||||||
| 743 | # attribute => 'String' | ||||||||||||||||||||
| 744 | # context => '#stay' | ||||||||||||||||||||
| 745 | # type => 'LineContinue' | ||||||||||||||||||||
| 746 | 322 | ▶ | if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 747 | 0 | return 1 | |||||||||||||||||||
| 748 | } | ||||||||||||||||||||
| 749 | # attribute => 'String Char' | ||||||||||||||||||||
| 750 | # context => '#stay' | ||||||||||||||||||||
| 751 | # type => 'HlCStringChar' | ||||||||||||||||||||
| 752 | 322 | ▶ | if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 753 | 6 | return 1 | |||||||||||||||||||
| 754 | } | ||||||||||||||||||||
| 755 | # attribute => 'String' | ||||||||||||||||||||
| 756 | # char => '"' | ||||||||||||||||||||
| 757 | # context => '#pop' | ||||||||||||||||||||
| 758 | # type => 'DetectChar' | ||||||||||||||||||||
| 759 | 316 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 760 | 32 | return 1 | |||||||||||||||||||
| 761 | } | ||||||||||||||||||||
| 762 | 284 | return 0; | |||||||||||||||||||
| 763 | }; | ||||||||||||||||||||
| 764 | |||||||||||||||||||||
| 765 | |||||||||||||||||||||
| 766 | 1 | 1; | |||||||||||||||||||
| 767 | |||||||||||||||||||||
| 768 | __END__ | ||||||||||||||||||||