| 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 'd.xml' file of the syntax highlight | ||||||||||||||||||||
| 6 | # engine of the kate text editor (http://www.kate-editor.org | ||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | #kate xml version 1.36 | ||||||||||||||||||||
| 9 | #kate version 2.2 | ||||||||||||||||||||
| 10 | #kate author Simon J Mackenzie (project.katedxml@smackoz.fastmail.fm) | ||||||||||||||||||||
| 11 | #generated: Sun Feb 3 22:02:04 2008, localtime | ||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | package Syntax::Highlight::Engine::Kate::D; | ||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 1 | our $VERSION = '0.14'; | |||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 18 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 19 | 1 | ▶ | use base('Syntax::Highlight::Engine::Kate::Template'); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | sub new { | ||||||||||||||||||||
| 22 | 1 | ▶ | my $proto = shift; | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 23 | 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
| |||||||||||||||||||||
| 24 | 1 | my $self = $class->SUPER::new(@_); | |||||||||||||||||||
| 25 | 1 | $self->attributes({ | |||||||||||||||||||
| 26 | 'Assert' => 'Variable', | ||||||||||||||||||||
| 27 | 'Binary' => 'BaseN', | ||||||||||||||||||||
| 28 | 'Char' => 'Char', | ||||||||||||||||||||
| 29 | 'Comment' => 'Comment', | ||||||||||||||||||||
| 30 | 'Debug' => 'BaseN', | ||||||||||||||||||||
| 31 | 'Escape String' => 'String', | ||||||||||||||||||||
| 32 | 'Float' => 'Float', | ||||||||||||||||||||
| 33 | 'Hex' => 'BaseN', | ||||||||||||||||||||
| 34 | 'Integer' => 'DecVal', | ||||||||||||||||||||
| 35 | 'Keyword' => 'Keyword', | ||||||||||||||||||||
| 36 | 'Linkage' => 'IString', | ||||||||||||||||||||
| 37 | 'Linkage Type' => 'Others', | ||||||||||||||||||||
| 38 | 'Module' => 'Keyword', | ||||||||||||||||||||
| 39 | 'Module Name' => 'Reserved', | ||||||||||||||||||||
| 40 | 'Normal Text' => 'Normal', | ||||||||||||||||||||
| 41 | 'Octal' => 'BaseN', | ||||||||||||||||||||
| 42 | 'Phobos Library' => 'BString', | ||||||||||||||||||||
| 43 | 'Pragma' => 'Keyword', | ||||||||||||||||||||
| 44 | 'String' => 'String', | ||||||||||||||||||||
| 45 | 'Type' => 'DataType', | ||||||||||||||||||||
| 46 | 'Unit Test' => 'RegionMarker', | ||||||||||||||||||||
| 47 | 'Version' => 'Keyword', | ||||||||||||||||||||
| 48 | 'Version Type' => 'DataType', | ||||||||||||||||||||
| 49 | 'Wysiwyg' => 'Char', | ||||||||||||||||||||
| 50 | }); | ||||||||||||||||||||
| 51 | 1 | $self->listAdd('assert', | |||||||||||||||||||
| 52 | 'assert', | ||||||||||||||||||||
| 53 | ); | ||||||||||||||||||||
| 54 | 1 | $self->listAdd('debug', | |||||||||||||||||||
| 55 | 'debug', | ||||||||||||||||||||
| 56 | ); | ||||||||||||||||||||
| 57 | 1 | $self->listAdd('keywords', | |||||||||||||||||||
| 58 | 'abstract', | ||||||||||||||||||||
| 59 | 'alias', | ||||||||||||||||||||
| 60 | 'align', | ||||||||||||||||||||
| 61 | 'asm', | ||||||||||||||||||||
| 62 | 'auto', | ||||||||||||||||||||
| 63 | 'body', | ||||||||||||||||||||
| 64 | 'break', | ||||||||||||||||||||
| 65 | 'case', | ||||||||||||||||||||
| 66 | 'cast', | ||||||||||||||||||||
| 67 | 'catch', | ||||||||||||||||||||
| 68 | 'class', | ||||||||||||||||||||
| 69 | 'const', | ||||||||||||||||||||
| 70 | 'continue', | ||||||||||||||||||||
| 71 | 'default', | ||||||||||||||||||||
| 72 | 'delegate', | ||||||||||||||||||||
| 73 | 'delete', | ||||||||||||||||||||
| 74 | 'deprecated', | ||||||||||||||||||||
| 75 | 'do', | ||||||||||||||||||||
| 76 | 'else', | ||||||||||||||||||||
| 77 | 'enum', | ||||||||||||||||||||
| 78 | 'export', | ||||||||||||||||||||
| 79 | 'false', | ||||||||||||||||||||
| 80 | 'final', | ||||||||||||||||||||
| 81 | 'finally', | ||||||||||||||||||||
| 82 | 'for', | ||||||||||||||||||||
| 83 | 'foreach', | ||||||||||||||||||||
| 84 | 'function', | ||||||||||||||||||||
| 85 | 'goto', | ||||||||||||||||||||
| 86 | 'if', | ||||||||||||||||||||
| 87 | 'in', | ||||||||||||||||||||
| 88 | 'inout', | ||||||||||||||||||||
| 89 | 'interface', | ||||||||||||||||||||
| 90 | 'invariant', | ||||||||||||||||||||
| 91 | 'is', | ||||||||||||||||||||
| 92 | 'mixin', | ||||||||||||||||||||
| 93 | 'new', | ||||||||||||||||||||
| 94 | 'null', | ||||||||||||||||||||
| 95 | 'out', | ||||||||||||||||||||
| 96 | 'override', | ||||||||||||||||||||
| 97 | 'package', | ||||||||||||||||||||
| 98 | 'private', | ||||||||||||||||||||
| 99 | 'protected', | ||||||||||||||||||||
| 100 | 'public', | ||||||||||||||||||||
| 101 | 'return', | ||||||||||||||||||||
| 102 | 'static', | ||||||||||||||||||||
| 103 | 'struct', | ||||||||||||||||||||
| 104 | 'super', | ||||||||||||||||||||
| 105 | 'switch', | ||||||||||||||||||||
| 106 | 'synchronized', | ||||||||||||||||||||
| 107 | 'template', | ||||||||||||||||||||
| 108 | 'this', | ||||||||||||||||||||
| 109 | 'throw', | ||||||||||||||||||||
| 110 | 'true', | ||||||||||||||||||||
| 111 | 'try', | ||||||||||||||||||||
| 112 | 'typedef', | ||||||||||||||||||||
| 113 | 'typeof', | ||||||||||||||||||||
| 114 | 'union', | ||||||||||||||||||||
| 115 | 'volatile', | ||||||||||||||||||||
| 116 | 'while', | ||||||||||||||||||||
| 117 | 'with', | ||||||||||||||||||||
| 118 | ); | ||||||||||||||||||||
| 119 | 1 | $self->listAdd('linkage', | |||||||||||||||||||
| 120 | 'extern', | ||||||||||||||||||||
| 121 | ); | ||||||||||||||||||||
| 122 | 1 | $self->listAdd('ltypes', | |||||||||||||||||||
| 123 | 'C', | ||||||||||||||||||||
| 124 | 'D', | ||||||||||||||||||||
| 125 | 'Pascal', | ||||||||||||||||||||
| 126 | 'Windows', | ||||||||||||||||||||
| 127 | ); | ||||||||||||||||||||
| 128 | 1 | $self->listAdd('modules', | |||||||||||||||||||
| 129 | 'import', | ||||||||||||||||||||
| 130 | 'module', | ||||||||||||||||||||
| 131 | ); | ||||||||||||||||||||
| 132 | 1 | $self->listAdd('phobos', | |||||||||||||||||||
| 133 | 'printf', | ||||||||||||||||||||
| 134 | 'writef', | ||||||||||||||||||||
| 135 | ); | ||||||||||||||||||||
| 136 | 1 | $self->listAdd('pragma', | |||||||||||||||||||
| 137 | 'pragma', | ||||||||||||||||||||
| 138 | ); | ||||||||||||||||||||
| 139 | 1 | $self->listAdd('ptypes', | |||||||||||||||||||
| 140 | 'msg', | ||||||||||||||||||||
| 141 | ); | ||||||||||||||||||||
| 142 | 1 | $self->listAdd('types', | |||||||||||||||||||
| 143 | 'bit', | ||||||||||||||||||||
| 144 | 'byte', | ||||||||||||||||||||
| 145 | 'cdouble', | ||||||||||||||||||||
| 146 | 'cent', | ||||||||||||||||||||
| 147 | 'cfloat', | ||||||||||||||||||||
| 148 | 'char', | ||||||||||||||||||||
| 149 | 'creal', | ||||||||||||||||||||
| 150 | 'dchar', | ||||||||||||||||||||
| 151 | 'double', | ||||||||||||||||||||
| 152 | 'float', | ||||||||||||||||||||
| 153 | 'idouble', | ||||||||||||||||||||
| 154 | 'ifloat', | ||||||||||||||||||||
| 155 | 'int', | ||||||||||||||||||||
| 156 | 'ireal', | ||||||||||||||||||||
| 157 | 'long', | ||||||||||||||||||||
| 158 | 'real', | ||||||||||||||||||||
| 159 | 'short', | ||||||||||||||||||||
| 160 | 'ubyte', | ||||||||||||||||||||
| 161 | 'ucent', | ||||||||||||||||||||
| 162 | 'uint', | ||||||||||||||||||||
| 163 | 'ulong', | ||||||||||||||||||||
| 164 | 'ushort', | ||||||||||||||||||||
| 165 | 'void', | ||||||||||||||||||||
| 166 | 'wchar', | ||||||||||||||||||||
| 167 | ); | ||||||||||||||||||||
| 168 | 1 | $self->listAdd('unittest', | |||||||||||||||||||
| 169 | 'unittest', | ||||||||||||||||||||
| 170 | ); | ||||||||||||||||||||
| 171 | 1 | $self->listAdd('version', | |||||||||||||||||||
| 172 | 'version', | ||||||||||||||||||||
| 173 | ); | ||||||||||||||||||||
| 174 | 1 | $self->listAdd('vtypes', | |||||||||||||||||||
| 175 | 'AMD64', | ||||||||||||||||||||
| 176 | 'BigEndian', | ||||||||||||||||||||
| 177 | 'D_InlineAsm', | ||||||||||||||||||||
| 178 | 'DigitalMars', | ||||||||||||||||||||
| 179 | 'LittleEndian', | ||||||||||||||||||||
| 180 | 'Win32', | ||||||||||||||||||||
| 181 | 'Win64', | ||||||||||||||||||||
| 182 | 'Windows', | ||||||||||||||||||||
| 183 | 'X86', | ||||||||||||||||||||
| 184 | 'linux', | ||||||||||||||||||||
| 185 | 'none', | ||||||||||||||||||||
| 186 | ); | ||||||||||||||||||||
| 187 | 1 | $self->contextdata({ | |||||||||||||||||||
| 188 | 'Char' => { | ||||||||||||||||||||
| 189 | callback => \&parseChar, | ||||||||||||||||||||
| 190 | attribute => 'Char', | ||||||||||||||||||||
| 191 | }, | ||||||||||||||||||||
| 192 | 'CommentBlockA' => { | ||||||||||||||||||||
| 193 | callback => \&parseCommentBlockA, | ||||||||||||||||||||
| 194 | attribute => 'Comment', | ||||||||||||||||||||
| 195 | }, | ||||||||||||||||||||
| 196 | 'CommentBlockB' => { | ||||||||||||||||||||
| 197 | callback => \&parseCommentBlockB, | ||||||||||||||||||||
| 198 | attribute => 'Comment', | ||||||||||||||||||||
| 199 | }, | ||||||||||||||||||||
| 200 | 'CommentLine' => { | ||||||||||||||||||||
| 201 | callback => \&parseCommentLine, | ||||||||||||||||||||
| 202 | attribute => 'Comment', | ||||||||||||||||||||
| 203 | lineending => '#pop', | ||||||||||||||||||||
| 204 | }, | ||||||||||||||||||||
| 205 | 'Hex' => { | ||||||||||||||||||||
| 206 | callback => \&parseHex, | ||||||||||||||||||||
| 207 | attribute => 'Hex', | ||||||||||||||||||||
| 208 | }, | ||||||||||||||||||||
| 209 | 'Linkage' => { | ||||||||||||||||||||
| 210 | callback => \&parseLinkage, | ||||||||||||||||||||
| 211 | attribute => 'Linkage', | ||||||||||||||||||||
| 212 | lineending => '#pop', | ||||||||||||||||||||
| 213 | }, | ||||||||||||||||||||
| 214 | 'ModuleName' => { | ||||||||||||||||||||
| 215 | callback => \&parseModuleName, | ||||||||||||||||||||
| 216 | attribute => 'Module Name', | ||||||||||||||||||||
| 217 | }, | ||||||||||||||||||||
| 218 | 'Pragmas' => { | ||||||||||||||||||||
| 219 | callback => \&parsePragmas, | ||||||||||||||||||||
| 220 | attribute => 'Pragma', | ||||||||||||||||||||
| 221 | lineending => '#pop', | ||||||||||||||||||||
| 222 | }, | ||||||||||||||||||||
| 223 | 'String' => { | ||||||||||||||||||||
| 224 | callback => \&parseString, | ||||||||||||||||||||
| 225 | attribute => 'String', | ||||||||||||||||||||
| 226 | }, | ||||||||||||||||||||
| 227 | 'Version' => { | ||||||||||||||||||||
| 228 | callback => \&parseVersion, | ||||||||||||||||||||
| 229 | attribute => 'Version', | ||||||||||||||||||||
| 230 | lineending => '#pop', | ||||||||||||||||||||
| 231 | }, | ||||||||||||||||||||
| 232 | 'Wysiwyg' => { | ||||||||||||||||||||
| 233 | callback => \&parseWysiwyg, | ||||||||||||||||||||
| 234 | attribute => 'Wysiwyg', | ||||||||||||||||||||
| 235 | }, | ||||||||||||||||||||
| 236 | 'normal' => { | ||||||||||||||||||||
| 237 | callback => \&parsenormal, | ||||||||||||||||||||
| 238 | attribute => 'Normal Text', | ||||||||||||||||||||
| 239 | }, | ||||||||||||||||||||
| 240 | }); | ||||||||||||||||||||
| 241 | 1 | $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); | |||||||||||||||||||
| 242 | 1 | $self->basecontext('normal'); | |||||||||||||||||||
| 243 | 1 | $self->keywordscase(1); | |||||||||||||||||||
| 244 | 1 | $self->initialize; | |||||||||||||||||||
| 245 | 1 | bless ($self, $class); | |||||||||||||||||||
| 246 | 1 | return $self; | |||||||||||||||||||
| 247 | } | ||||||||||||||||||||
| 248 | |||||||||||||||||||||
| 249 | sub language { | ||||||||||||||||||||
| 250 | 0 | ▶ | return 'D'; | ||||||||||||||||||
|
Subroutine
language: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 251 | } | ||||||||||||||||||||
| 252 | |||||||||||||||||||||
| 253 | sub parseChar { | ||||||||||||||||||||
| 254 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseChar: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 255 | # attribute => 'Char' | ||||||||||||||||||||
| 256 | # char => '\' | ||||||||||||||||||||
| 257 | # char1 => ''' | ||||||||||||||||||||
| 258 | # context => '#stay' | ||||||||||||||||||||
| 259 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 260 | 0 | ▶ | if ($self->testDetect2Chars($text, '\\', '\'', 0, 0, 0, undef, 0, '#stay', 'Char')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 261 | 0 | return 1 | |||||||||||||||||||
| 262 | } | ||||||||||||||||||||
| 263 | # attribute => 'Char' | ||||||||||||||||||||
| 264 | # char => '\' | ||||||||||||||||||||
| 265 | # char1 => '\' | ||||||||||||||||||||
| 266 | # context => '#stay' | ||||||||||||||||||||
| 267 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 268 | 0 | ▶ | if ($self->testDetect2Chars($text, '\\', '\\', 0, 0, 0, undef, 0, '#stay', 'Char')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 269 | 0 | return 1 | |||||||||||||||||||
| 270 | } | ||||||||||||||||||||
| 271 | # attribute => 'Char' | ||||||||||||||||||||
| 272 | # char => ''' | ||||||||||||||||||||
| 273 | # context => '#pop' | ||||||||||||||||||||
| 274 | # type => 'DetectChar' | ||||||||||||||||||||
| 275 | 0 | ▶ | if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'Char')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 276 | 0 | return 1 | |||||||||||||||||||
| 277 | } | ||||||||||||||||||||
| 278 | 0 | return 0; | |||||||||||||||||||
| 279 | }; | ||||||||||||||||||||
| 280 | |||||||||||||||||||||
| 281 | sub parseCommentBlockA { | ||||||||||||||||||||
| 282 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseCommentBlockA: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 283 | # attribute => 'Comment' | ||||||||||||||||||||
| 284 | # char => '*' | ||||||||||||||||||||
| 285 | # char1 => '/' | ||||||||||||||||||||
| 286 | # context => '#pop' | ||||||||||||||||||||
| 287 | # endRegion => 'CommentA' | ||||||||||||||||||||
| 288 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 289 | 0 | ▶ | if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 290 | 0 | return 1 | |||||||||||||||||||
| 291 | } | ||||||||||||||||||||
| 292 | 0 | return 0; | |||||||||||||||||||
| 293 | }; | ||||||||||||||||||||
| 294 | |||||||||||||||||||||
| 295 | sub parseCommentBlockB { | ||||||||||||||||||||
| 296 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseCommentBlockB: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 297 | # attribute => 'Comment' | ||||||||||||||||||||
| 298 | # char => '+' | ||||||||||||||||||||
| 299 | # char1 => '/' | ||||||||||||||||||||
| 300 | # context => '#pop' | ||||||||||||||||||||
| 301 | # endRegion => 'CommentB' | ||||||||||||||||||||
| 302 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 303 | 0 | ▶ | if ($self->testDetect2Chars($text, '+', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 304 | 0 | return 1 | |||||||||||||||||||
| 305 | } | ||||||||||||||||||||
| 306 | 0 | return 0; | |||||||||||||||||||
| 307 | }; | ||||||||||||||||||||
| 308 | |||||||||||||||||||||
| 309 | sub parseCommentLine { | ||||||||||||||||||||
| 310 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseCommentLine: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 311 | 0 | return 0; | |||||||||||||||||||
| 312 | }; | ||||||||||||||||||||
| 313 | |||||||||||||||||||||
| 314 | sub parseHex { | ||||||||||||||||||||
| 315 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseHex: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 316 | # attribute => 'Hex' | ||||||||||||||||||||
| 317 | # char => '"' | ||||||||||||||||||||
| 318 | # context => '#pop' | ||||||||||||||||||||
| 319 | # type => 'DetectChar' | ||||||||||||||||||||
| 320 | 0 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'Hex')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 321 | 0 | return 1 | |||||||||||||||||||
| 322 | } | ||||||||||||||||||||
| 323 | 0 | return 0; | |||||||||||||||||||
| 324 | }; | ||||||||||||||||||||
| 325 | |||||||||||||||||||||
| 326 | sub parseLinkage { | ||||||||||||||||||||
| 327 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseLinkage: not called CC=6 SCAR=37.4
Pod
undocumented
| |||||||||||||||||||||
| 328 | # String => 'types' | ||||||||||||||||||||
| 329 | # attribute => 'Type' | ||||||||||||||||||||
| 330 | # context => '#pop' | ||||||||||||||||||||
| 331 | # type => 'keyword' | ||||||||||||||||||||
| 332 | 0 | ▶ | if ($self->testKeyword($text, 'types', 0, undef, 0, '#pop', 'Type')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 333 | 0 | return 1 | |||||||||||||||||||
| 334 | } | ||||||||||||||||||||
| 335 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 336 | # char => '(' | ||||||||||||||||||||
| 337 | # context => '#stay' | ||||||||||||||||||||
| 338 | # type => 'DetectChar' | ||||||||||||||||||||
| 339 | 0 | ▶ | if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 340 | 0 | return 1 | |||||||||||||||||||
| 341 | } | ||||||||||||||||||||
| 342 | # String => 'ltypes' | ||||||||||||||||||||
| 343 | # attribute => 'Linkage Type' | ||||||||||||||||||||
| 344 | # context => '#stay' | ||||||||||||||||||||
| 345 | # type => 'keyword' | ||||||||||||||||||||
| 346 | 0 | ▶ | if ($self->testKeyword($text, 'ltypes', 0, undef, 0, '#stay', 'Linkage Type')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 347 | 0 | return 1 | |||||||||||||||||||
| 348 | } | ||||||||||||||||||||
| 349 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 350 | # char => ')' | ||||||||||||||||||||
| 351 | # context => '#pop' | ||||||||||||||||||||
| 352 | # type => 'DetectChar' | ||||||||||||||||||||
| 353 | 0 | ▶ | if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 354 | 0 | return 1 | |||||||||||||||||||
| 355 | } | ||||||||||||||||||||
| 356 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 357 | # char => ';' | ||||||||||||||||||||
| 358 | # context => '#pop' | ||||||||||||||||||||
| 359 | # type => 'DetectChar' | ||||||||||||||||||||
| 360 | 0 | ▶ | if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 361 | 0 | return 1 | |||||||||||||||||||
| 362 | } | ||||||||||||||||||||
| 363 | 0 | return 0; | |||||||||||||||||||
| 364 | }; | ||||||||||||||||||||
| 365 | |||||||||||||||||||||
| 366 | sub parseModuleName { | ||||||||||||||||||||
| 367 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseModuleName: not called CC=6 SCAR=37.4
Pod
undocumented
| |||||||||||||||||||||
| 368 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 369 | # char => ',' | ||||||||||||||||||||
| 370 | # context => '#stay' | ||||||||||||||||||||
| 371 | # type => 'DetectChar' | ||||||||||||||||||||
| 372 | 0 | ▶ | if ($self->testDetectChar($text, ',', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 373 | 0 | return 1 | |||||||||||||||||||
| 374 | } | ||||||||||||||||||||
| 375 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 376 | # char => ';' | ||||||||||||||||||||
| 377 | # context => '#pop' | ||||||||||||||||||||
| 378 | # type => 'DetectChar' | ||||||||||||||||||||
| 379 | 0 | ▶ | if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 380 | 0 | return 1 | |||||||||||||||||||
| 381 | } | ||||||||||||||||||||
| 382 | # attribute => 'Comment' | ||||||||||||||||||||
| 383 | # char => '/' | ||||||||||||||||||||
| 384 | # char1 => '/' | ||||||||||||||||||||
| 385 | # context => 'CommentLine' | ||||||||||||||||||||
| 386 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 387 | 0 | ▶ | if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'CommentLine', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 388 | 0 | return 1 | |||||||||||||||||||
| 389 | } | ||||||||||||||||||||
| 390 | # attribute => 'Comment' | ||||||||||||||||||||
| 391 | # beginRegion => 'CommentA' | ||||||||||||||||||||
| 392 | # char => '/' | ||||||||||||||||||||
| 393 | # char1 => '*' | ||||||||||||||||||||
| 394 | # context => 'CommentBlockA' | ||||||||||||||||||||
| 395 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 396 | 0 | ▶ | if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'CommentBlockA', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 397 | 0 | return 1 | |||||||||||||||||||
| 398 | } | ||||||||||||||||||||
| 399 | # attribute => 'Comment' | ||||||||||||||||||||
| 400 | # beginRegion => 'CommentB' | ||||||||||||||||||||
| 401 | # char => '/' | ||||||||||||||||||||
| 402 | # char1 => '+' | ||||||||||||||||||||
| 403 | # context => 'CommentBlockB' | ||||||||||||||||||||
| 404 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 405 | 0 | ▶ | if ($self->testDetect2Chars($text, '/', '+', 0, 0, 0, undef, 0, 'CommentBlockB', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 406 | 0 | return 1 | |||||||||||||||||||
| 407 | } | ||||||||||||||||||||
| 408 | 0 | return 0; | |||||||||||||||||||
| 409 | }; | ||||||||||||||||||||
| 410 | |||||||||||||||||||||
| 411 | sub parsePragmas { | ||||||||||||||||||||
| 412 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parsePragmas: not called CC=7 SCAR=40.3
Pod
undocumented
| |||||||||||||||||||||
| 413 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 414 | # char => '(' | ||||||||||||||||||||
| 415 | # context => '#stay' | ||||||||||||||||||||
| 416 | # type => 'DetectChar' | ||||||||||||||||||||
| 417 | 0 | ▶ | if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 418 | 0 | return 1 | |||||||||||||||||||
| 419 | } | ||||||||||||||||||||
| 420 | # String => 'ptypes' | ||||||||||||||||||||
| 421 | # attribute => 'Version Type' | ||||||||||||||||||||
| 422 | # context => '#stay' | ||||||||||||||||||||
| 423 | # type => 'keyword' | ||||||||||||||||||||
| 424 | 0 | ▶ | if ($self->testKeyword($text, 'ptypes', 0, undef, 0, '#stay', 'Version Type')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 425 | 0 | return 1 | |||||||||||||||||||
| 426 | } | ||||||||||||||||||||
| 427 | # String => 'vtypes' | ||||||||||||||||||||
| 428 | # attribute => 'Version Type' | ||||||||||||||||||||
| 429 | # context => '#stay' | ||||||||||||||||||||
| 430 | # type => 'keyword' | ||||||||||||||||||||
| 431 | 0 | ▶ | if ($self->testKeyword($text, 'vtypes', 0, undef, 0, '#stay', 'Version Type')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 432 | 0 | return 1 | |||||||||||||||||||
| 433 | } | ||||||||||||||||||||
| 434 | # String => '[_a-z][\w]*' | ||||||||||||||||||||
| 435 | # attribute => 'Keyword' | ||||||||||||||||||||
| 436 | # context => '#pop' | ||||||||||||||||||||
| 437 | # insensitive => 'true' | ||||||||||||||||||||
| 438 | # type => 'RegExpr' | ||||||||||||||||||||
| 439 | 0 | ▶ | if ($self->testRegExpr($text, '[_a-z][\\w]*', 1, 0, 0, undef, 0, '#pop', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 440 | 0 | return 1 | |||||||||||||||||||
| 441 | } | ||||||||||||||||||||
| 442 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 443 | # char => ',' | ||||||||||||||||||||
| 444 | # context => '#pop' | ||||||||||||||||||||
| 445 | # type => 'DetectChar' | ||||||||||||||||||||
| 446 | 0 | ▶ | if ($self->testDetectChar($text, ',', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 447 | 0 | return 1 | |||||||||||||||||||
| 448 | } | ||||||||||||||||||||
| 449 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 450 | # char => ')' | ||||||||||||||||||||
| 451 | # context => '#pop' | ||||||||||||||||||||
| 452 | # type => 'DetectChar' | ||||||||||||||||||||
| 453 | 0 | ▶ | if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 454 | 0 | return 1 | |||||||||||||||||||
| 455 | } | ||||||||||||||||||||
| 456 | 0 | return 0; | |||||||||||||||||||
| 457 | }; | ||||||||||||||||||||
| 458 | |||||||||||||||||||||
| 459 | sub parseString { | ||||||||||||||||||||
| 460 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseString: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 461 | # attribute => 'String' | ||||||||||||||||||||
| 462 | # char => '"' | ||||||||||||||||||||
| 463 | # context => '#pop' | ||||||||||||||||||||
| 464 | # type => 'DetectChar' | ||||||||||||||||||||
| 465 | 0 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 466 | 0 | return 1 | |||||||||||||||||||
| 467 | } | ||||||||||||||||||||
| 468 | 0 | return 0; | |||||||||||||||||||
| 469 | }; | ||||||||||||||||||||
| 470 | |||||||||||||||||||||
| 471 | sub parseVersion { | ||||||||||||||||||||
| 472 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseVersion: not called CC=6 SCAR=37.4
Pod
undocumented
| |||||||||||||||||||||
| 473 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 474 | # char => '=' | ||||||||||||||||||||
| 475 | # context => '#pop' | ||||||||||||||||||||
| 476 | # type => 'DetectChar' | ||||||||||||||||||||
| 477 | 0 | ▶ | if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 478 | 0 | return 1 | |||||||||||||||||||
| 479 | } | ||||||||||||||||||||
| 480 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 481 | # char => '(' | ||||||||||||||||||||
| 482 | # context => '#stay' | ||||||||||||||||||||
| 483 | # type => 'DetectChar' | ||||||||||||||||||||
| 484 | 0 | ▶ | if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 485 | 0 | return 1 | |||||||||||||||||||
| 486 | } | ||||||||||||||||||||
| 487 | # String => 'vtypes' | ||||||||||||||||||||
| 488 | # attribute => 'Version Type' | ||||||||||||||||||||
| 489 | # context => '#stay' | ||||||||||||||||||||
| 490 | # type => 'keyword' | ||||||||||||||||||||
| 491 | 0 | ▶ | if ($self->testKeyword($text, 'vtypes', 0, undef, 0, '#stay', 'Version Type')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 492 | 0 | return 1 | |||||||||||||||||||
| 493 | } | ||||||||||||||||||||
| 494 | # String => '\w' | ||||||||||||||||||||
| 495 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 496 | # context => '#pop' | ||||||||||||||||||||
| 497 | # insensitive => 'true' | ||||||||||||||||||||
| 498 | # type => 'RegExpr' | ||||||||||||||||||||
| 499 | 0 | ▶ | if ($self->testRegExpr($text, '\\w', 1, 0, 0, undef, 0, '#pop', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 500 | 0 | return 1 | |||||||||||||||||||
| 501 | } | ||||||||||||||||||||
| 502 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 503 | # char => ')' | ||||||||||||||||||||
| 504 | # context => '#pop' | ||||||||||||||||||||
| 505 | # type => 'DetectChar' | ||||||||||||||||||||
| 506 | 0 | ▶ | if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 507 | 0 | return 1 | |||||||||||||||||||
| 508 | } | ||||||||||||||||||||
| 509 | 0 | return 0; | |||||||||||||||||||
| 510 | }; | ||||||||||||||||||||
| 511 | |||||||||||||||||||||
| 512 | sub parseWysiwyg { | ||||||||||||||||||||
| 513 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseWysiwyg: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 514 | # attribute => 'Wysiwyg' | ||||||||||||||||||||
| 515 | # char => '"' | ||||||||||||||||||||
| 516 | # context => '#pop' | ||||||||||||||||||||
| 517 | # type => 'DetectChar' | ||||||||||||||||||||
| 518 | 0 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'Wysiwyg')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 519 | 0 | return 1 | |||||||||||||||||||
| 520 | } | ||||||||||||||||||||
| 521 | # attribute => 'Wysiwyg' | ||||||||||||||||||||
| 522 | # char => '`' | ||||||||||||||||||||
| 523 | # context => '#pop' | ||||||||||||||||||||
| 524 | # type => 'DetectChar' | ||||||||||||||||||||
| 525 | 0 | ▶ | if ($self->testDetectChar($text, '`', 0, 0, 0, undef, 0, '#pop', 'Wysiwyg')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 526 | 0 | return 1 | |||||||||||||||||||
| 527 | } | ||||||||||||||||||||
| 528 | 0 | return 0; | |||||||||||||||||||
| 529 | }; | ||||||||||||||||||||
| 530 | |||||||||||||||||||||
| 531 | sub parsenormal { | ||||||||||||||||||||
| 532 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parsenormal: not called CC=40 SCAR=74.0
Pod
undocumented
| |||||||||||||||||||||
| 533 | # String => 'keywords' | ||||||||||||||||||||
| 534 | # attribute => 'Keyword' | ||||||||||||||||||||
| 535 | # context => '#stay' | ||||||||||||||||||||
| 536 | # type => 'keyword' | ||||||||||||||||||||
| 537 | 0 | ▶ | if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 538 | 0 | return 1 | |||||||||||||||||||
| 539 | } | ||||||||||||||||||||
| 540 | # String => 'modules' | ||||||||||||||||||||
| 541 | # attribute => 'Module' | ||||||||||||||||||||
| 542 | # context => 'ModuleName' | ||||||||||||||||||||
| 543 | # type => 'keyword' | ||||||||||||||||||||
| 544 | 0 | ▶ | if ($self->testKeyword($text, 'modules', 0, undef, 0, 'ModuleName', 'Module')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 545 | 0 | return 1 | |||||||||||||||||||
| 546 | } | ||||||||||||||||||||
| 547 | # String => 'types' | ||||||||||||||||||||
| 548 | # attribute => 'Type' | ||||||||||||||||||||
| 549 | # context => '#stay' | ||||||||||||||||||||
| 550 | # type => 'keyword' | ||||||||||||||||||||
| 551 | 0 | ▶ | if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Type')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 552 | 0 | return 1 | |||||||||||||||||||
| 553 | } | ||||||||||||||||||||
| 554 | # String => 'phobos' | ||||||||||||||||||||
| 555 | # attribute => 'Phobos Library' | ||||||||||||||||||||
| 556 | # context => '#stay' | ||||||||||||||||||||
| 557 | # type => 'keyword' | ||||||||||||||||||||
| 558 | 0 | ▶ | if ($self->testKeyword($text, 'phobos', 0, undef, 0, '#stay', 'Phobos Library')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 559 | 0 | return 1 | |||||||||||||||||||
| 560 | } | ||||||||||||||||||||
| 561 | # String => 'linkage' | ||||||||||||||||||||
| 562 | # attribute => 'Linkage' | ||||||||||||||||||||
| 563 | # context => 'Linkage' | ||||||||||||||||||||
| 564 | # type => 'keyword' | ||||||||||||||||||||
| 565 | 0 | ▶ | if ($self->testKeyword($text, 'linkage', 0, undef, 0, 'Linkage', 'Linkage')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 566 | 0 | return 1 | |||||||||||||||||||
| 567 | } | ||||||||||||||||||||
| 568 | # String => 'debug' | ||||||||||||||||||||
| 569 | # attribute => 'Debug' | ||||||||||||||||||||
| 570 | # context => '#stay' | ||||||||||||||||||||
| 571 | # type => 'keyword' | ||||||||||||||||||||
| 572 | 0 | ▶ | if ($self->testKeyword($text, 'debug', 0, undef, 0, '#stay', 'Debug')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 573 | 0 | return 1 | |||||||||||||||||||
| 574 | } | ||||||||||||||||||||
| 575 | # String => 'assert' | ||||||||||||||||||||
| 576 | # attribute => 'Assert' | ||||||||||||||||||||
| 577 | # context => '#stay' | ||||||||||||||||||||
| 578 | # type => 'keyword' | ||||||||||||||||||||
| 579 | 0 | ▶ | if ($self->testKeyword($text, 'assert', 0, undef, 0, '#stay', 'Assert')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 580 | 0 | return 1 | |||||||||||||||||||
| 581 | } | ||||||||||||||||||||
| 582 | # String => 'pragma' | ||||||||||||||||||||
| 583 | # attribute => 'Pragma' | ||||||||||||||||||||
| 584 | # context => 'Pragmas' | ||||||||||||||||||||
| 585 | # type => 'keyword' | ||||||||||||||||||||
| 586 | 0 | ▶ | if ($self->testKeyword($text, 'pragma', 0, undef, 0, 'Pragmas', 'Pragma')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 587 | 0 | return 1 | |||||||||||||||||||
| 588 | } | ||||||||||||||||||||
| 589 | # String => 'version' | ||||||||||||||||||||
| 590 | # attribute => 'Version' | ||||||||||||||||||||
| 591 | # context => 'Version' | ||||||||||||||||||||
| 592 | # type => 'keyword' | ||||||||||||||||||||
| 593 | 0 | ▶ | if ($self->testKeyword($text, 'version', 0, undef, 0, 'Version', 'Version')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 594 | 0 | return 1 | |||||||||||||||||||
| 595 | } | ||||||||||||||||||||
| 596 | # String => 'unittest' | ||||||||||||||||||||
| 597 | # attribute => 'Unit Test' | ||||||||||||||||||||
| 598 | # context => '#stay' | ||||||||||||||||||||
| 599 | # type => 'keyword' | ||||||||||||||||||||
| 600 | 0 | ▶ | if ($self->testKeyword($text, 'unittest', 0, undef, 0, '#stay', 'Unit Test')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 601 | 0 | return 1 | |||||||||||||||||||
| 602 | } | ||||||||||||||||||||
| 603 | # attribute => 'Wysiwyg' | ||||||||||||||||||||
| 604 | # char => 'r' | ||||||||||||||||||||
| 605 | # char1 => '"' | ||||||||||||||||||||
| 606 | # context => 'Wysiwyg' | ||||||||||||||||||||
| 607 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 608 | 0 | ▶ | if ($self->testDetect2Chars($text, 'r', '"', 0, 0, 0, undef, 0, 'Wysiwyg', 'Wysiwyg')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 609 | 0 | return 1 | |||||||||||||||||||
| 610 | } | ||||||||||||||||||||
| 611 | # attribute => 'Hex' | ||||||||||||||||||||
| 612 | # char => 'x' | ||||||||||||||||||||
| 613 | # char1 => '"' | ||||||||||||||||||||
| 614 | # context => 'Hex' | ||||||||||||||||||||
| 615 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 616 | 0 | ▶ | if ($self->testDetect2Chars($text, 'x', '"', 0, 0, 0, undef, 0, 'Hex', 'Hex')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 617 | 0 | return 1 | |||||||||||||||||||
| 618 | } | ||||||||||||||||||||
| 619 | # String => '[_a-z][\w]*' | ||||||||||||||||||||
| 620 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 621 | # context => '#pop' | ||||||||||||||||||||
| 622 | # insensitive => 'true' | ||||||||||||||||||||
| 623 | # type => 'RegExpr' | ||||||||||||||||||||
| 624 | 0 | ▶ | if ($self->testRegExpr($text, '[_a-z][\\w]*', 1, 0, 0, undef, 0, '#pop', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 625 | 0 | return 1 | |||||||||||||||||||
| 626 | } | ||||||||||||||||||||
| 627 | # String => '\#[ ]*line' | ||||||||||||||||||||
| 628 | # attribute => 'Pragma' | ||||||||||||||||||||
| 629 | # context => '#pop' | ||||||||||||||||||||
| 630 | # type => 'RegExpr' | ||||||||||||||||||||
| 631 | 0 | ▶ | if ($self->testRegExpr($text, '\\#[ ]*line', 0, 0, 0, undef, 0, '#pop', 'Pragma')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 632 | 0 | return 1 | |||||||||||||||||||
| 633 | } | ||||||||||||||||||||
| 634 | # String => '\\[n|t|"]' | ||||||||||||||||||||
| 635 | # attribute => 'Escape String' | ||||||||||||||||||||
| 636 | # context => '#pop' | ||||||||||||||||||||
| 637 | # type => 'RegExpr' | ||||||||||||||||||||
| 638 | 0 | ▶ | if ($self->testRegExpr($text, '\\\\[n|t|"]', 0, 0, 0, undef, 0, '#pop', 'Escape String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 639 | 0 | return 1 | |||||||||||||||||||
| 640 | } | ||||||||||||||||||||
| 641 | # String => '(\\r\\n)' | ||||||||||||||||||||
| 642 | # attribute => 'Escape String' | ||||||||||||||||||||
| 643 | # context => '#pop' | ||||||||||||||||||||
| 644 | # type => 'RegExpr' | ||||||||||||||||||||
| 645 | 0 | ▶ | if ($self->testRegExpr($text, '(\\\\r\\\\n)', 0, 0, 0, undef, 0, '#pop', 'Escape String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 646 | 0 | return 1 | |||||||||||||||||||
| 647 | } | ||||||||||||||||||||
| 648 | # String => '\\0[0-7]+' | ||||||||||||||||||||
| 649 | # attribute => 'Escape String' | ||||||||||||||||||||
| 650 | # context => '#pop' | ||||||||||||||||||||
| 651 | # type => 'RegExpr' | ||||||||||||||||||||
| 652 | 0 | ▶ | if ($self->testRegExpr($text, '\\\\0[0-7]+', 0, 0, 0, undef, 0, '#pop', 'Escape String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 653 | 0 | return 1 | |||||||||||||||||||
| 654 | } | ||||||||||||||||||||
| 655 | # String => '\\u[\d]+' | ||||||||||||||||||||
| 656 | # attribute => 'Escape String' | ||||||||||||||||||||
| 657 | # context => '#pop' | ||||||||||||||||||||
| 658 | # insensitive => 'true' | ||||||||||||||||||||
| 659 | # type => 'RegExpr' | ||||||||||||||||||||
| 660 | 0 | ▶ | if ($self->testRegExpr($text, '\\\\u[\\d]+', 1, 0, 0, undef, 0, '#pop', 'Escape String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 661 | 0 | return 1 | |||||||||||||||||||
| 662 | } | ||||||||||||||||||||
| 663 | # String => '\\x[\da-fA-F]+' | ||||||||||||||||||||
| 664 | # attribute => 'Escape String' | ||||||||||||||||||||
| 665 | # context => '#pop' | ||||||||||||||||||||
| 666 | # type => 'RegExpr' | ||||||||||||||||||||
| 667 | 0 | ▶ | if ($self->testRegExpr($text, '\\\\x[\\da-fA-F]+', 0, 0, 0, undef, 0, '#pop', 'Escape String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 668 | 0 | return 1 | |||||||||||||||||||
| 669 | } | ||||||||||||||||||||
| 670 | # String => '0b[01]+[_01]*[ ]*\.\.[ ]*0b[01]+[_01]*(UL|LU|U|L)?' | ||||||||||||||||||||
| 671 | # attribute => 'Binary' | ||||||||||||||||||||
| 672 | # context => '#pop' | ||||||||||||||||||||
| 673 | # insensitive => 'true' | ||||||||||||||||||||
| 674 | # type => 'RegExpr' | ||||||||||||||||||||
| 675 | 0 | ▶ | if ($self->testRegExpr($text, '0b[01]+[_01]*[ ]*\\.\\.[ ]*0b[01]+[_01]*(UL|LU|U|L)?', 1, 0, 0, undef, 0, '#pop', 'Binary')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 676 | 0 | return 1 | |||||||||||||||||||
| 677 | } | ||||||||||||||||||||
| 678 | # String => '0[0-7]+[_0-7]*[ ]*\.\.[ ]*0[0-7]+[_0-7]*(UL|LU|U|L)?' | ||||||||||||||||||||
| 679 | # attribute => 'Octal' | ||||||||||||||||||||
| 680 | # context => '#pop' | ||||||||||||||||||||
| 681 | # insensitive => 'true' | ||||||||||||||||||||
| 682 | # type => 'RegExpr' | ||||||||||||||||||||
| 683 | 0 | ▶ | if ($self->testRegExpr($text, '0[0-7]+[_0-7]*[ ]*\\.\\.[ ]*0[0-7]+[_0-7]*(UL|LU|U|L)?', 1, 0, 0, undef, 0, '#pop', 'Octal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 684 | 0 | return 1 | |||||||||||||||||||
| 685 | } | ||||||||||||||||||||
| 686 | # String => '0x[\da-f]+[_\da-f]*[ ]*\.\.[ ]*0x[\da-f]+[_\da-f]*(UL|LU|U|L)?' | ||||||||||||||||||||
| 687 | # attribute => 'Hex' | ||||||||||||||||||||
| 688 | # context => '#pop' | ||||||||||||||||||||
| 689 | # insensitive => 'true' | ||||||||||||||||||||
| 690 | # type => 'RegExpr' | ||||||||||||||||||||
| 691 | 0 | ▶ | if ($self->testRegExpr($text, '0x[\\da-f]+[_\\da-f]*[ ]*\\.\\.[ ]*0x[\\da-f]+[_\\da-f]*(UL|LU|U|L)?', 1, 0, 0, undef, 0, '#pop', 'Hex')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 692 | 0 | return 1 | |||||||||||||||||||
| 693 | } | ||||||||||||||||||||
| 694 | # String => '[\d]+[_\d]*(UL|LU|U|L)?[ ]*\.\.[ ]*[\d]+[_\d]*(UL|LU|U|L)?' | ||||||||||||||||||||
| 695 | # attribute => 'Integer' | ||||||||||||||||||||
| 696 | # context => '#pop' | ||||||||||||||||||||
| 697 | # insensitive => 'true' | ||||||||||||||||||||
| 698 | # type => 'RegExpr' | ||||||||||||||||||||
| 699 | 0 | ▶ | if ($self->testRegExpr($text, '[\\d]+[_\\d]*(UL|LU|U|L)?[ ]*\\.\\.[ ]*[\\d]+[_\\d]*(UL|LU|U|L)?', 1, 0, 0, undef, 0, '#pop', 'Integer')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 700 | 0 | return 1 | |||||||||||||||||||
| 701 | } | ||||||||||||||||||||
| 702 | # String => '[\d]*[_\d]*\.[_\d]*(e-|e|e\+)?[\d]+[_\d]*(F|L|I|FI|LI|)?' | ||||||||||||||||||||
| 703 | # attribute => 'Float' | ||||||||||||||||||||
| 704 | # context => '#pop' | ||||||||||||||||||||
| 705 | # insensitive => 'true' | ||||||||||||||||||||
| 706 | # type => 'RegExpr' | ||||||||||||||||||||
| 707 | 0 | ▶ | if ($self->testRegExpr($text, '[\\d]*[_\\d]*\\.[_\\d]*(e-|e|e\\+)?[\\d]+[_\\d]*(F|L|I|FI|LI|)?', 1, 0, 0, undef, 0, '#pop', 'Float')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 708 | 0 | return 1 | |||||||||||||||||||
| 709 | } | ||||||||||||||||||||
| 710 | # String => '[\d]*[_\d]*\.?[_\d]*(e-|e|e\+)[\d]+[_\d]*(F|L|I|FI|LI|)?' | ||||||||||||||||||||
| 711 | # attribute => 'Float' | ||||||||||||||||||||
| 712 | # context => '#pop' | ||||||||||||||||||||
| 713 | # insensitive => 'true' | ||||||||||||||||||||
| 714 | # type => 'RegExpr' | ||||||||||||||||||||
| 715 | 0 | ▶ | if ($self->testRegExpr($text, '[\\d]*[_\\d]*\\.?[_\\d]*(e-|e|e\\+)[\\d]+[_\\d]*(F|L|I|FI|LI|)?', 1, 0, 0, undef, 0, '#pop', 'Float')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 716 | 0 | return 1 | |||||||||||||||||||
| 717 | } | ||||||||||||||||||||
| 718 | # String => '0x[\da-f]+[_\da-f]*\.[_\da-f]*(p-|p|p\+)?[\da-f]+[_\da-f]*(F|L|I|FI|LI)?' | ||||||||||||||||||||
| 719 | # attribute => 'Float' | ||||||||||||||||||||
| 720 | # context => '#pop' | ||||||||||||||||||||
| 721 | # insensitive => 'true' | ||||||||||||||||||||
| 722 | # type => 'RegExpr' | ||||||||||||||||||||
| 723 | 0 | ▶ | if ($self->testRegExpr($text, '0x[\\da-f]+[_\\da-f]*\\.[_\\da-f]*(p-|p|p\\+)?[\\da-f]+[_\\da-f]*(F|L|I|FI|LI)?', 1, 0, 0, undef, 0, '#pop', 'Float')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 724 | 0 | return 1 | |||||||||||||||||||
| 725 | } | ||||||||||||||||||||
| 726 | # String => '0x[\da-f]+[_\da-f]*\.?[_\da-f]*(p-|p|p\+)[\da-f]+[_\da-f]*(F|L|I|FI|LI)?' | ||||||||||||||||||||
| 727 | # attribute => 'Float' | ||||||||||||||||||||
| 728 | # context => '#pop' | ||||||||||||||||||||
| 729 | # insensitive => 'true' | ||||||||||||||||||||
| 730 | # type => 'RegExpr' | ||||||||||||||||||||
| 731 | 0 | ▶ | if ($self->testRegExpr($text, '0x[\\da-f]+[_\\da-f]*\\.?[_\\da-f]*(p-|p|p\\+)[\\da-f]+[_\\da-f]*(F|L|I|FI|LI)?', 1, 0, 0, undef, 0, '#pop', 'Float')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 732 | 0 | return 1 | |||||||||||||||||||
| 733 | } | ||||||||||||||||||||
| 734 | # String => '0B[01]+[_01]*(UL|LU|U|L)?' | ||||||||||||||||||||
| 735 | # attribute => 'Binary' | ||||||||||||||||||||
| 736 | # context => '#pop' | ||||||||||||||||||||
| 737 | # insensitive => 'true' | ||||||||||||||||||||
| 738 | # type => 'RegExpr' | ||||||||||||||||||||
| 739 | 0 | ▶ | if ($self->testRegExpr($text, '0B[01]+[_01]*(UL|LU|U|L)?', 1, 0, 0, undef, 0, '#pop', 'Binary')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 740 | 0 | return 1 | |||||||||||||||||||
| 741 | } | ||||||||||||||||||||
| 742 | # String => '0[0-7]+[_0-7]*(UL|LU|U|L)?' | ||||||||||||||||||||
| 743 | # attribute => 'Octal' | ||||||||||||||||||||
| 744 | # context => '#pop' | ||||||||||||||||||||
| 745 | # insensitive => 'true' | ||||||||||||||||||||
| 746 | # type => 'RegExpr' | ||||||||||||||||||||
| 747 | 0 | ▶ | if ($self->testRegExpr($text, '0[0-7]+[_0-7]*(UL|LU|U|L)?', 1, 0, 0, undef, 0, '#pop', 'Octal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 748 | 0 | return 1 | |||||||||||||||||||
| 749 | } | ||||||||||||||||||||
| 750 | # String => '0x[\da-f]+[_\da-f]*(UL|LU|U|L)?' | ||||||||||||||||||||
| 751 | # attribute => 'Hex' | ||||||||||||||||||||
| 752 | # context => '#pop' | ||||||||||||||||||||
| 753 | # insensitive => 'true' | ||||||||||||||||||||
| 754 | # type => 'RegExpr' | ||||||||||||||||||||
| 755 | 0 | ▶ | if ($self->testRegExpr($text, '0x[\\da-f]+[_\\da-f]*(UL|LU|U|L)?', 1, 0, 0, undef, 0, '#pop', 'Hex')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 756 | 0 | return 1 | |||||||||||||||||||
| 757 | } | ||||||||||||||||||||
| 758 | # String => '[\d]+[_\d]*(UL|LU|U|L)?' | ||||||||||||||||||||
| 759 | # attribute => 'Integer' | ||||||||||||||||||||
| 760 | # context => '#pop' | ||||||||||||||||||||
| 761 | # insensitive => 'true' | ||||||||||||||||||||
| 762 | # type => 'RegExpr' | ||||||||||||||||||||
| 763 | 0 | ▶ | if ($self->testRegExpr($text, '[\\d]+[_\\d]*(UL|LU|U|L)?', 1, 0, 0, undef, 0, '#pop', 'Integer')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 764 | 0 | return 1 | |||||||||||||||||||
| 765 | } | ||||||||||||||||||||
| 766 | # attribute => 'Char' | ||||||||||||||||||||
| 767 | # char => ''' | ||||||||||||||||||||
| 768 | # context => 'Char' | ||||||||||||||||||||
| 769 | # type => 'DetectChar' | ||||||||||||||||||||
| 770 | 0 | ▶ | if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'Char', 'Char')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 771 | 0 | return 1 | |||||||||||||||||||
| 772 | } | ||||||||||||||||||||
| 773 | # attribute => 'String' | ||||||||||||||||||||
| 774 | # char => '"' | ||||||||||||||||||||
| 775 | # context => 'String' | ||||||||||||||||||||
| 776 | # type => 'DetectChar' | ||||||||||||||||||||
| 777 | 0 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 778 | 0 | return 1 | |||||||||||||||||||
| 779 | } | ||||||||||||||||||||
| 780 | # attribute => 'Wysiwyg' | ||||||||||||||||||||
| 781 | # char => '`' | ||||||||||||||||||||
| 782 | # context => 'Wysiwyg' | ||||||||||||||||||||
| 783 | # type => 'DetectChar' | ||||||||||||||||||||
| 784 | 0 | ▶ | if ($self->testDetectChar($text, '`', 0, 0, 0, undef, 0, 'Wysiwyg', 'Wysiwyg')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 785 | 0 | return 1 | |||||||||||||||||||
| 786 | } | ||||||||||||||||||||
| 787 | # attribute => 'Comment' | ||||||||||||||||||||
| 788 | # char => '/' | ||||||||||||||||||||
| 789 | # char1 => '/' | ||||||||||||||||||||
| 790 | # context => 'CommentLine' | ||||||||||||||||||||
| 791 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 792 | 0 | ▶ | if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'CommentLine', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 793 | 0 | return 1 | |||||||||||||||||||
| 794 | } | ||||||||||||||||||||
| 795 | # attribute => 'Comment' | ||||||||||||||||||||
| 796 | # beginRegion => 'CommentA' | ||||||||||||||||||||
| 797 | # char => '/' | ||||||||||||||||||||
| 798 | # char1 => '*' | ||||||||||||||||||||
| 799 | # context => 'CommentBlockA' | ||||||||||||||||||||
| 800 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 801 | 0 | ▶ | if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'CommentBlockA', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 802 | 0 | return 1 | |||||||||||||||||||
| 803 | } | ||||||||||||||||||||
| 804 | # attribute => 'Comment' | ||||||||||||||||||||
| 805 | # beginRegion => 'CommentB' | ||||||||||||||||||||
| 806 | # char => '/' | ||||||||||||||||||||
| 807 | # char1 => '+' | ||||||||||||||||||||
| 808 | # context => 'CommentBlockB' | ||||||||||||||||||||
| 809 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 810 | 0 | ▶ | if ($self->testDetect2Chars($text, '/', '+', 0, 0, 0, undef, 0, 'CommentBlockB', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 811 | 0 | return 1 | |||||||||||||||||||
| 812 | } | ||||||||||||||||||||
| 813 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 814 | # beginRegion => 'BraceA' | ||||||||||||||||||||
| 815 | # char => '{' | ||||||||||||||||||||
| 816 | # context => '#stay' | ||||||||||||||||||||
| 817 | # type => 'DetectChar' | ||||||||||||||||||||
| 818 | 0 | ▶ | if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 819 | 0 | return 1 | |||||||||||||||||||
| 820 | } | ||||||||||||||||||||
| 821 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 822 | # char => '}' | ||||||||||||||||||||
| 823 | # context => '#stay' | ||||||||||||||||||||
| 824 | # endRegion => 'BraceA' | ||||||||||||||||||||
| 825 | # type => 'DetectChar' | ||||||||||||||||||||
| 826 | 0 | ▶ | if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 827 | 0 | return 1 | |||||||||||||||||||
| 828 | } | ||||||||||||||||||||
| 829 | 0 | return 0; | |||||||||||||||||||
| 830 | }; | ||||||||||||||||||||
| 831 | |||||||||||||||||||||
| 832 | |||||||||||||||||||||
| 833 | 1 | 1; | |||||||||||||||||||
| 834 | |||||||||||||||||||||
| 835 | __END__ | ||||||||||||||||||||