| 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 'ferite.xml' file of the syntax highlight | ||||||||||||||||||||
| 6 | # engine of the kate text editor (http://www.kate-editor.org | ||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | #kate xml version 1.04 | ||||||||||||||||||||
| 9 | #kate version 2.4 | ||||||||||||||||||||
| 10 | #generated: Sun Feb 3 22:02:04 2008, localtime | ||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | package Syntax::Highlight::Engine::Kate::Ferite; | ||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 1 | our $VERSION = '0.16'; | |||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 17 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 18 | 1 | ▶ | use base('Syntax::Highlight::Engine::Kate::Template'); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||
| 21 | 1 | my $proto = shift; | |||||||||||||||||||
| 22 | 1 | ▶ | my $class = ref($proto) || $proto; | ||||||||||||||||||
|
Condition33%1/3
ref $proto || $proto
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||
| 23 | 1 | my $self = $class->SUPER::new(@_); | |||||||||||||||||||
| 24 | 1 | $self->attributes({ | |||||||||||||||||||
| 25 | 'Alert' => 'Alert', | ||||||||||||||||||||
| 26 | 'Char' => 'Char', | ||||||||||||||||||||
| 27 | 'Comment' => 'Comment', | ||||||||||||||||||||
| 28 | 'Data Type' => 'DataType', | ||||||||||||||||||||
| 29 | 'Decimal' => 'DecVal', | ||||||||||||||||||||
| 30 | 'Float' => 'Float', | ||||||||||||||||||||
| 31 | 'Hex' => 'BaseN', | ||||||||||||||||||||
| 32 | 'Keyword' => 'Keyword', | ||||||||||||||||||||
| 33 | 'Normal Text' => 'Normal', | ||||||||||||||||||||
| 34 | 'Octal' => 'BaseN', | ||||||||||||||||||||
| 35 | 'Prep. Lib' => 'Others', | ||||||||||||||||||||
| 36 | 'Preprocessor' => 'Others', | ||||||||||||||||||||
| 37 | 'String' => 'String', | ||||||||||||||||||||
| 38 | 'String Char' => 'Char', | ||||||||||||||||||||
| 39 | 'Symbol' => 'Normal', | ||||||||||||||||||||
| 40 | }); | ||||||||||||||||||||
| 41 | 1 | $self->listAdd('keywords', | |||||||||||||||||||
| 42 | 'break', | ||||||||||||||||||||
| 43 | 'case', | ||||||||||||||||||||
| 44 | 'class', | ||||||||||||||||||||
| 45 | 'continue', | ||||||||||||||||||||
| 46 | 'do', | ||||||||||||||||||||
| 47 | 'else', | ||||||||||||||||||||
| 48 | 'fix', | ||||||||||||||||||||
| 49 | 'for', | ||||||||||||||||||||
| 50 | 'function', | ||||||||||||||||||||
| 51 | 'global', | ||||||||||||||||||||
| 52 | 'if', | ||||||||||||||||||||
| 53 | 'iferr', | ||||||||||||||||||||
| 54 | 'namespace', | ||||||||||||||||||||
| 55 | 'new', | ||||||||||||||||||||
| 56 | 'null', | ||||||||||||||||||||
| 57 | 'return', | ||||||||||||||||||||
| 58 | 'self', | ||||||||||||||||||||
| 59 | 'super', | ||||||||||||||||||||
| 60 | 'uses', | ||||||||||||||||||||
| 61 | 'while', | ||||||||||||||||||||
| 62 | ); | ||||||||||||||||||||
| 63 | 1 | $self->listAdd('types', | |||||||||||||||||||
| 64 | 'array', | ||||||||||||||||||||
| 65 | 'final', | ||||||||||||||||||||
| 66 | 'number', | ||||||||||||||||||||
| 67 | 'object', | ||||||||||||||||||||
| 68 | 'static', | ||||||||||||||||||||
| 69 | 'string', | ||||||||||||||||||||
| 70 | 'void', | ||||||||||||||||||||
| 71 | ); | ||||||||||||||||||||
| 72 | 1 | $self->contextdata({ | |||||||||||||||||||
| 73 | 'Comment' => { | ||||||||||||||||||||
| 74 | callback => \&parseComment, | ||||||||||||||||||||
| 75 | attribute => 'Comment', | ||||||||||||||||||||
| 76 | lineending => '#pop', | ||||||||||||||||||||
| 77 | }, | ||||||||||||||||||||
| 78 | 'Default' => { | ||||||||||||||||||||
| 79 | callback => \&parseDefault, | ||||||||||||||||||||
| 80 | attribute => 'Normal Text', | ||||||||||||||||||||
| 81 | }, | ||||||||||||||||||||
| 82 | 'Multiline Comment' => { | ||||||||||||||||||||
| 83 | callback => \&parseMultilineComment, | ||||||||||||||||||||
| 84 | attribute => 'Comment', | ||||||||||||||||||||
| 85 | }, | ||||||||||||||||||||
| 86 | 'Multiline Comment 2' => { | ||||||||||||||||||||
| 87 | callback => \&parseMultilineComment2, | ||||||||||||||||||||
| 88 | attribute => 'Comment', | ||||||||||||||||||||
| 89 | }, | ||||||||||||||||||||
| 90 | 'Preprocessor' => { | ||||||||||||||||||||
| 91 | callback => \&parsePreprocessor, | ||||||||||||||||||||
| 92 | attribute => 'Preprocessor', | ||||||||||||||||||||
| 93 | lineending => '#pop', | ||||||||||||||||||||
| 94 | }, | ||||||||||||||||||||
| 95 | 'String' => { | ||||||||||||||||||||
| 96 | callback => \&parseString, | ||||||||||||||||||||
| 97 | attribute => 'String', | ||||||||||||||||||||
| 98 | lineending => '#pop', | ||||||||||||||||||||
| 99 | }, | ||||||||||||||||||||
| 100 | 'Undeffed' => { | ||||||||||||||||||||
| 101 | callback => \&parseUndeffed, | ||||||||||||||||||||
| 102 | attribute => 'Comment', | ||||||||||||||||||||
| 103 | }, | ||||||||||||||||||||
| 104 | 'unknown' => { | ||||||||||||||||||||
| 105 | callback => \&parseunknown, | ||||||||||||||||||||
| 106 | attribute => 'Normal Text', | ||||||||||||||||||||
| 107 | lineending => '#pop', | ||||||||||||||||||||
| 108 | }, | ||||||||||||||||||||
| 109 | 'unknown 2' => { | ||||||||||||||||||||
| 110 | callback => \&parseunknown2, | ||||||||||||||||||||
| 111 | attribute => 'Normal Text', | ||||||||||||||||||||
| 112 | lineending => '#pop', | ||||||||||||||||||||
| 113 | }, | ||||||||||||||||||||
| 114 | }); | ||||||||||||||||||||
| 115 | 1 | $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); | |||||||||||||||||||
| 116 | 1 | $self->basecontext('Default'); | |||||||||||||||||||
| 117 | 1 | $self->keywordscase(0); | |||||||||||||||||||
| 118 | 1 | $self->initialize; | |||||||||||||||||||
| 119 | 1 | bless ($self, $class); | |||||||||||||||||||
| 120 | 1 | return $self; | |||||||||||||||||||
| 121 | } | ||||||||||||||||||||
| 122 | |||||||||||||||||||||
| 123 | 0 | ▶ | sub language { | ||||||||||||||||||
|
Subroutine
language: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 124 | 0 | return 'ferite'; | |||||||||||||||||||
| 125 | } | ||||||||||||||||||||
| 126 | |||||||||||||||||||||
| 127 | 0 | ▶ | sub parseComment { | ||||||||||||||||||
|
Subroutine
parseComment: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 128 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 129 | # String => '(FIXME|TODO)' | ||||||||||||||||||||
| 130 | # attribute => 'Alert' | ||||||||||||||||||||
| 131 | # context => '#stay' | ||||||||||||||||||||
| 132 | # type => 'RegExpr' | ||||||||||||||||||||
| 133 | 0 | ▶ | if ($self->testRegExpr($text, '(FIXME|TODO)', 0, 0, 0, undef, 0, '#stay', 'Alert')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 134 | 0 | return 1 | |||||||||||||||||||
| 135 | } | ||||||||||||||||||||
| 136 | 0 | return 0; | |||||||||||||||||||
| 137 | }; | ||||||||||||||||||||
| 138 | |||||||||||||||||||||
| 139 | 0 | ▶ | sub parseDefault { | ||||||||||||||||||
|
Subroutine
parseDefault: not called CC=23 SCAR=63.1
Pod
undocumented
| |||||||||||||||||||||
| 140 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 141 | # String => 'keywords' | ||||||||||||||||||||
| 142 | # attribute => 'Keyword' | ||||||||||||||||||||
| 143 | # context => '#stay' | ||||||||||||||||||||
| 144 | # type => 'keyword' | ||||||||||||||||||||
| 145 | 0 | ▶ | if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 146 | 0 | return 1 | |||||||||||||||||||
| 147 | } | ||||||||||||||||||||
| 148 | # String => 'types' | ||||||||||||||||||||
| 149 | # attribute => 'Data Type' | ||||||||||||||||||||
| 150 | # context => '#stay' | ||||||||||||||||||||
| 151 | # type => 'keyword' | ||||||||||||||||||||
| 152 | 0 | ▶ | if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 153 | 0 | return 1 | |||||||||||||||||||
| 154 | } | ||||||||||||||||||||
| 155 | # attribute => 'Float' | ||||||||||||||||||||
| 156 | # context => '#stay' | ||||||||||||||||||||
| 157 | # items => 'ARRAY(0xfd97c0)' | ||||||||||||||||||||
| 158 | # type => 'Float' | ||||||||||||||||||||
| 159 | 0 | ▶ | if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 160 | # String => 'fF' | ||||||||||||||||||||
| 161 | # attribute => 'Float' | ||||||||||||||||||||
| 162 | # context => '#stay' | ||||||||||||||||||||
| 163 | # type => 'AnyChar' | ||||||||||||||||||||
| 164 | 0 | ▶ | if ($self->testAnyChar($text, 'fF', 0, 0, undef, 0, '#stay', 'Float')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 165 | 0 | return 1 | |||||||||||||||||||
| 166 | } | ||||||||||||||||||||
| 167 | } | ||||||||||||||||||||
| 168 | # attribute => 'Octal' | ||||||||||||||||||||
| 169 | # context => '#stay' | ||||||||||||||||||||
| 170 | # type => 'HlCOct' | ||||||||||||||||||||
| 171 | 0 | ▶ | if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 172 | 0 | return 1 | |||||||||||||||||||
| 173 | } | ||||||||||||||||||||
| 174 | # attribute => 'Hex' | ||||||||||||||||||||
| 175 | # context => '#stay' | ||||||||||||||||||||
| 176 | # type => 'HlCHex' | ||||||||||||||||||||
| 177 | 0 | ▶ | if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 178 | 0 | return 1 | |||||||||||||||||||
| 179 | } | ||||||||||||||||||||
| 180 | # attribute => 'Decimal' | ||||||||||||||||||||
| 181 | # context => '#stay' | ||||||||||||||||||||
| 182 | # items => 'ARRAY(0x11bdd60)' | ||||||||||||||||||||
| 183 | # type => 'Int' | ||||||||||||||||||||
| 184 | 0 | ▶ | if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 185 | # String => 'ULL' | ||||||||||||||||||||
| 186 | # attribute => 'Decimal' | ||||||||||||||||||||
| 187 | # context => '#stay' | ||||||||||||||||||||
| 188 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 189 | # type => 'StringDetect' | ||||||||||||||||||||
| 190 | 0 | ▶ | if ($self->testStringDetect($text, 'ULL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 191 | 0 | return 1 | |||||||||||||||||||
| 192 | } | ||||||||||||||||||||
| 193 | # String => 'LUL' | ||||||||||||||||||||
| 194 | # attribute => 'Decimal' | ||||||||||||||||||||
| 195 | # context => '#stay' | ||||||||||||||||||||
| 196 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 197 | # type => 'StringDetect' | ||||||||||||||||||||
| 198 | 0 | ▶ | if ($self->testStringDetect($text, 'LUL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 199 | 0 | return 1 | |||||||||||||||||||
| 200 | } | ||||||||||||||||||||
| 201 | # String => 'LLU' | ||||||||||||||||||||
| 202 | # attribute => 'Decimal' | ||||||||||||||||||||
| 203 | # context => '#stay' | ||||||||||||||||||||
| 204 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 205 | # type => 'StringDetect' | ||||||||||||||||||||
| 206 | 0 | ▶ | if ($self->testStringDetect($text, 'LLU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 207 | 0 | return 1 | |||||||||||||||||||
| 208 | } | ||||||||||||||||||||
| 209 | # String => 'UL' | ||||||||||||||||||||
| 210 | # attribute => 'Decimal' | ||||||||||||||||||||
| 211 | # context => '#stay' | ||||||||||||||||||||
| 212 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 213 | # type => 'StringDetect' | ||||||||||||||||||||
| 214 | 0 | ▶ | if ($self->testStringDetect($text, 'UL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 215 | 0 | return 1 | |||||||||||||||||||
| 216 | } | ||||||||||||||||||||
| 217 | # String => 'LU' | ||||||||||||||||||||
| 218 | # attribute => 'Decimal' | ||||||||||||||||||||
| 219 | # context => '#stay' | ||||||||||||||||||||
| 220 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 221 | # type => 'StringDetect' | ||||||||||||||||||||
| 222 | 0 | ▶ | if ($self->testStringDetect($text, 'LU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 223 | 0 | return 1 | |||||||||||||||||||
| 224 | } | ||||||||||||||||||||
| 225 | # String => 'LL' | ||||||||||||||||||||
| 226 | # attribute => 'Decimal' | ||||||||||||||||||||
| 227 | # context => '#stay' | ||||||||||||||||||||
| 228 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 229 | # type => 'StringDetect' | ||||||||||||||||||||
| 230 | 0 | ▶ | if ($self->testStringDetect($text, 'LL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 231 | 0 | return 1 | |||||||||||||||||||
| 232 | } | ||||||||||||||||||||
| 233 | # String => 'U' | ||||||||||||||||||||
| 234 | # attribute => 'Decimal' | ||||||||||||||||||||
| 235 | # context => '#stay' | ||||||||||||||||||||
| 236 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 237 | # type => 'StringDetect' | ||||||||||||||||||||
| 238 | 0 | ▶ | if ($self->testStringDetect($text, 'U', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 239 | 0 | return 1 | |||||||||||||||||||
| 240 | } | ||||||||||||||||||||
| 241 | # String => 'L' | ||||||||||||||||||||
| 242 | # attribute => 'Decimal' | ||||||||||||||||||||
| 243 | # context => '#stay' | ||||||||||||||||||||
| 244 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 245 | # type => 'StringDetect' | ||||||||||||||||||||
| 246 | 0 | ▶ | if ($self->testStringDetect($text, 'L', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 247 | 0 | return 1 | |||||||||||||||||||
| 248 | } | ||||||||||||||||||||
| 249 | } | ||||||||||||||||||||
| 250 | # attribute => 'Char' | ||||||||||||||||||||
| 251 | # context => '#stay' | ||||||||||||||||||||
| 252 | # type => 'HlCChar' | ||||||||||||||||||||
| 253 | 0 | ▶ | if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 254 | 0 | return 1 | |||||||||||||||||||
| 255 | } | ||||||||||||||||||||
| 256 | # attribute => 'String' | ||||||||||||||||||||
| 257 | # char => '"' | ||||||||||||||||||||
| 258 | # context => 'String' | ||||||||||||||||||||
| 259 | # type => 'DetectChar' | ||||||||||||||||||||
| 260 | 0 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 261 | 0 | return 1 | |||||||||||||||||||
| 262 | } | ||||||||||||||||||||
| 263 | # attribute => 'Comment' | ||||||||||||||||||||
| 264 | # char => '/' | ||||||||||||||||||||
| 265 | # char1 => '/' | ||||||||||||||||||||
| 266 | # context => 'Comment' | ||||||||||||||||||||
| 267 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 268 | 0 | ▶ | if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Comment', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 269 | 0 | return 1 | |||||||||||||||||||
| 270 | } | ||||||||||||||||||||
| 271 | # attribute => 'Comment' | ||||||||||||||||||||
| 272 | # char => '/' | ||||||||||||||||||||
| 273 | # char1 => '*' | ||||||||||||||||||||
| 274 | # context => 'Multiline Comment' | ||||||||||||||||||||
| 275 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 276 | 0 | ▶ | if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Multiline Comment', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 277 | 0 | return 1 | |||||||||||||||||||
| 278 | } | ||||||||||||||||||||
| 279 | # String => '!%&()+,-<=>?[]^{|}~' | ||||||||||||||||||||
| 280 | # attribute => 'Symbol' | ||||||||||||||||||||
| 281 | # context => '#stay' | ||||||||||||||||||||
| 282 | # type => 'AnyChar' | ||||||||||||||||||||
| 283 | 0 | ▶ | if ($self->testAnyChar($text, '!%&()+,-<=>?[]^{|}~', 0, 0, undef, 0, '#stay', 'Symbol')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 284 | 0 | return 1 | |||||||||||||||||||
| 285 | } | ||||||||||||||||||||
| 286 | # String => '#if 0' | ||||||||||||||||||||
| 287 | # attribute => 'Comment' | ||||||||||||||||||||
| 288 | # context => 'Undeffed' | ||||||||||||||||||||
| 289 | # insensitive => 'FALSE' | ||||||||||||||||||||
| 290 | # type => 'StringDetect' | ||||||||||||||||||||
| 291 | 0 | ▶ | if ($self->testStringDetect($text, '#if 0', 0, 0, 0, undef, 0, 'Undeffed', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 292 | 0 | return 1 | |||||||||||||||||||
| 293 | } | ||||||||||||||||||||
| 294 | # attribute => 'Preprocessor' | ||||||||||||||||||||
| 295 | # char => '#' | ||||||||||||||||||||
| 296 | # column => '0' | ||||||||||||||||||||
| 297 | # context => 'Preprocessor' | ||||||||||||||||||||
| 298 | # type => 'DetectChar' | ||||||||||||||||||||
| 299 | 0 | ▶ | if ($self->testDetectChar($text, '#', 0, 0, 0, 0, 0, 'Preprocessor', 'Preprocessor')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 300 | 0 | return 1 | |||||||||||||||||||
| 301 | } | ||||||||||||||||||||
| 302 | 0 | return 0; | |||||||||||||||||||
| 303 | }; | ||||||||||||||||||||
| 304 | |||||||||||||||||||||
| 305 | 0 | ▶ | sub parseMultilineComment { | ||||||||||||||||||
|
Subroutine
parseMultilineComment: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 306 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 307 | # attribute => 'Comment' | ||||||||||||||||||||
| 308 | # char => '*' | ||||||||||||||||||||
| 309 | # char1 => '/' | ||||||||||||||||||||
| 310 | # context => '#pop' | ||||||||||||||||||||
| 311 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 312 | 0 | ▶ | if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 313 | 0 | return 1 | |||||||||||||||||||
| 314 | } | ||||||||||||||||||||
| 315 | # String => '(FIXME|TODO)' | ||||||||||||||||||||
| 316 | # attribute => 'Alert' | ||||||||||||||||||||
| 317 | # context => '#stay' | ||||||||||||||||||||
| 318 | # type => 'RegExpr' | ||||||||||||||||||||
| 319 | 0 | ▶ | if ($self->testRegExpr($text, '(FIXME|TODO)', 0, 0, 0, undef, 0, '#stay', 'Alert')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 320 | 0 | return 1 | |||||||||||||||||||
| 321 | } | ||||||||||||||||||||
| 322 | 0 | return 0; | |||||||||||||||||||
| 323 | }; | ||||||||||||||||||||
| 324 | |||||||||||||||||||||
| 325 | 0 | ▶ | sub parseMultilineComment2 { | ||||||||||||||||||
|
Subroutine
parseMultilineComment2: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 326 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 327 | # attribute => 'Comment' | ||||||||||||||||||||
| 328 | # char => '*' | ||||||||||||||||||||
| 329 | # char1 => '/' | ||||||||||||||||||||
| 330 | # context => '#pop' | ||||||||||||||||||||
| 331 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 332 | 0 | ▶ | if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 333 | 0 | return 1 | |||||||||||||||||||
| 334 | } | ||||||||||||||||||||
| 335 | 0 | return 0; | |||||||||||||||||||
| 336 | }; | ||||||||||||||||||||
| 337 | |||||||||||||||||||||
| 338 | 0 | ▶ | sub parsePreprocessor { | ||||||||||||||||||
|
Subroutine
parsePreprocessor: not called CC=6 SCAR=37.4
Pod
undocumented
| |||||||||||||||||||||
| 339 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 340 | # attribute => 'Preprocessor' | ||||||||||||||||||||
| 341 | # context => '#stay' | ||||||||||||||||||||
| 342 | # type => 'LineContinue' | ||||||||||||||||||||
| 343 | 0 | ▶ | if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Preprocessor')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 344 | 0 | return 1 | |||||||||||||||||||
| 345 | } | ||||||||||||||||||||
| 346 | # attribute => 'Prep. Lib' | ||||||||||||||||||||
| 347 | # char => '"' | ||||||||||||||||||||
| 348 | # char1 => '"' | ||||||||||||||||||||
| 349 | # context => '#stay' | ||||||||||||||||||||
| 350 | # type => 'RangeDetect' | ||||||||||||||||||||
| 351 | 0 | ▶ | if ($self->testRangeDetect($text, '"', '"', 0, 0, undef, 0, '#stay', 'Prep. Lib')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 352 | 0 | return 1 | |||||||||||||||||||
| 353 | } | ||||||||||||||||||||
| 354 | # attribute => 'Prep. Lib' | ||||||||||||||||||||
| 355 | # char => '<' | ||||||||||||||||||||
| 356 | # char1 => '>' | ||||||||||||||||||||
| 357 | # context => '#stay' | ||||||||||||||||||||
| 358 | # type => 'RangeDetect' | ||||||||||||||||||||
| 359 | 0 | ▶ | if ($self->testRangeDetect($text, '<', '>', 0, 0, undef, 0, '#stay', 'Prep. Lib')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 360 | 0 | return 1 | |||||||||||||||||||
| 361 | } | ||||||||||||||||||||
| 362 | # attribute => 'Comment' | ||||||||||||||||||||
| 363 | # char => '/' | ||||||||||||||||||||
| 364 | # char1 => '/' | ||||||||||||||||||||
| 365 | # context => 'Comment' | ||||||||||||||||||||
| 366 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 367 | 0 | ▶ | if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Comment', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 368 | 0 | return 1 | |||||||||||||||||||
| 369 | } | ||||||||||||||||||||
| 370 | # attribute => 'Comment' | ||||||||||||||||||||
| 371 | # char => '/' | ||||||||||||||||||||
| 372 | # char1 => '*' | ||||||||||||||||||||
| 373 | # context => 'Multiline Comment 2' | ||||||||||||||||||||
| 374 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 375 | 0 | ▶ | if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Multiline Comment 2', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 376 | 0 | return 1 | |||||||||||||||||||
| 377 | } | ||||||||||||||||||||
| 378 | 0 | return 0; | |||||||||||||||||||
| 379 | }; | ||||||||||||||||||||
| 380 | |||||||||||||||||||||
| 381 | 0 | ▶ | sub parseString { | ||||||||||||||||||
|
Subroutine
parseString: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 382 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 383 | # attribute => 'String' | ||||||||||||||||||||
| 384 | # context => '#stay' | ||||||||||||||||||||
| 385 | # type => 'LineContinue' | ||||||||||||||||||||
| 386 | 0 | ▶ | if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 387 | 0 | return 1 | |||||||||||||||||||
| 388 | } | ||||||||||||||||||||
| 389 | # attribute => 'String Char' | ||||||||||||||||||||
| 390 | # context => '#stay' | ||||||||||||||||||||
| 391 | # type => 'HlCStringChar' | ||||||||||||||||||||
| 392 | 0 | ▶ | if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 393 | 0 | return 1 | |||||||||||||||||||
| 394 | } | ||||||||||||||||||||
| 395 | # attribute => 'String' | ||||||||||||||||||||
| 396 | # char => '"' | ||||||||||||||||||||
| 397 | # context => '#pop' | ||||||||||||||||||||
| 398 | # type => 'DetectChar' | ||||||||||||||||||||
| 399 | 0 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 400 | 0 | return 1 | |||||||||||||||||||
| 401 | } | ||||||||||||||||||||
| 402 | 0 | return 0; | |||||||||||||||||||
| 403 | }; | ||||||||||||||||||||
| 404 | |||||||||||||||||||||
| 405 | 0 | ▶ | sub parseUndeffed { | ||||||||||||||||||
|
Subroutine
parseUndeffed: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 406 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 407 | # String => '(FIXME|TODO)' | ||||||||||||||||||||
| 408 | # attribute => 'Alert' | ||||||||||||||||||||
| 409 | # context => '#stay' | ||||||||||||||||||||
| 410 | # type => 'RegExpr' | ||||||||||||||||||||
| 411 | 0 | ▶ | if ($self->testRegExpr($text, '(FIXME|TODO)', 0, 0, 0, undef, 0, '#stay', 'Alert')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 412 | 0 | return 1 | |||||||||||||||||||
| 413 | } | ||||||||||||||||||||
| 414 | # String => '#endif' | ||||||||||||||||||||
| 415 | # attribute => 'Comment' | ||||||||||||||||||||
| 416 | # column => '0' | ||||||||||||||||||||
| 417 | # context => '#pop' | ||||||||||||||||||||
| 418 | # type => 'StringDetect' | ||||||||||||||||||||
| 419 | 0 | ▶ | if ($self->testStringDetect($text, '#endif', 0, 0, 0, 0, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 420 | 0 | return 1 | |||||||||||||||||||
| 421 | } | ||||||||||||||||||||
| 422 | 0 | return 0; | |||||||||||||||||||
| 423 | }; | ||||||||||||||||||||
| 424 | |||||||||||||||||||||
| 425 | 0 | ▶ | sub parseunknown { | ||||||||||||||||||
|
Subroutine
parseunknown: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 426 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 427 | 0 | return 0; | |||||||||||||||||||
| 428 | }; | ||||||||||||||||||||
| 429 | |||||||||||||||||||||
| 430 | 0 | ▶ | sub parseunknown2 { | ||||||||||||||||||
|
Subroutine
parseunknown2: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 431 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 432 | 0 | return 0; | |||||||||||||||||||
| 433 | }; | ||||||||||||||||||||
| 434 | |||||||||||||||||||||
| 435 | |||||||||||||||||||||
| 436 | 1 | 1; | |||||||||||||||||||
| 437 | |||||||||||||||||||||
| 438 | __END__ | ||||||||||||||||||||