| 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 'logohighlightstyle.nl.xml' file of the syntax highlight | ||||||||||||||||||||
| 6 | # engine of the kate text editor (http://www.kate-editor.org | ||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | #kate xml version 0.2 | ||||||||||||||||||||
| 9 | #kate version 2.1 | ||||||||||||||||||||
| 10 | #generated: Sun Feb 3 22:02:05 2008, localtime | ||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | package Syntax::Highlight::Engine::Kate::Nl; | ||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 1 | our $VERSION = '0.14'; | |||||||||||||||||||
| 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 | sub new { | ||||||||||||||||||||
| 21 | 1 | ▶ | my $proto = shift; | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||
| 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 | 'Boolean Operators' => 'BString', | ||||||||||||||||||||
| 26 | 'Comment' => 'Comment', | ||||||||||||||||||||
| 27 | 'Execution Controllers' => 'BaseN', | ||||||||||||||||||||
| 28 | 'Expressers' => 'Datatype', | ||||||||||||||||||||
| 29 | 'MetaFunctions' => 'Function', | ||||||||||||||||||||
| 30 | 'Normal' => 'Normal', | ||||||||||||||||||||
| 31 | 'Normal Text' => 'Normal', | ||||||||||||||||||||
| 32 | 'Number' => 'Float', | ||||||||||||||||||||
| 33 | 'Operator' => 'Operator', | ||||||||||||||||||||
| 34 | 'Raw String' => 'String', | ||||||||||||||||||||
| 35 | 'Scopes' => 'RegionMarker', | ||||||||||||||||||||
| 36 | 'Statements' => 'Keyword', | ||||||||||||||||||||
| 37 | 'String' => 'String', | ||||||||||||||||||||
| 38 | }); | ||||||||||||||||||||
| 39 | 1 | $self->listAdd('boolops', | |||||||||||||||||||
| 40 | 'en', | ||||||||||||||||||||
| 41 | 'niet', | ||||||||||||||||||||
| 42 | 'of', | ||||||||||||||||||||
| 43 | ); | ||||||||||||||||||||
| 44 | 1 | $self->listAdd('controllers', | |||||||||||||||||||
| 45 | 'als', | ||||||||||||||||||||
| 46 | 'anders', | ||||||||||||||||||||
| 47 | 'doe', | ||||||||||||||||||||
| 48 | 'geefdoor', | ||||||||||||||||||||
| 49 | 'herhaal', | ||||||||||||||||||||
| 50 | 'hh', | ||||||||||||||||||||
| 51 | 'in', | ||||||||||||||||||||
| 52 | 'kap', | ||||||||||||||||||||
| 53 | 'terwijl', | ||||||||||||||||||||
| 54 | 'tot', | ||||||||||||||||||||
| 55 | 'voor', | ||||||||||||||||||||
| 56 | 'voorelke', | ||||||||||||||||||||
| 57 | 'wacht', | ||||||||||||||||||||
| 58 | ); | ||||||||||||||||||||
| 59 | 1 | $self->listAdd('metafunctions', | |||||||||||||||||||
| 60 | 'leer', | ||||||||||||||||||||
| 61 | ); | ||||||||||||||||||||
| 62 | 1 | $self->listAdd('statements', | |||||||||||||||||||
| 63 | 'achteruit', | ||||||||||||||||||||
| 64 | 'alsnieuw', | ||||||||||||||||||||
| 65 | 'at', | ||||||||||||||||||||
| 66 | 'bericht', | ||||||||||||||||||||
| 67 | 'canvaskleur', | ||||||||||||||||||||
| 68 | 'canvasmaat', | ||||||||||||||||||||
| 69 | 'ck', | ||||||||||||||||||||
| 70 | 'cm', | ||||||||||||||||||||
| 71 | 'cs', | ||||||||||||||||||||
| 72 | 'dl', | ||||||||||||||||||||
| 73 | 'dr', | ||||||||||||||||||||
| 74 | 'draailinks', | ||||||||||||||||||||
| 75 | 'draairechts', | ||||||||||||||||||||
| 76 | 'druk', | ||||||||||||||||||||
| 77 | 'ds', | ||||||||||||||||||||
| 78 | 'ganaar', | ||||||||||||||||||||
| 79 | 'ganaarx', | ||||||||||||||||||||
| 80 | 'ganaary', | ||||||||||||||||||||
| 81 | 'gok', | ||||||||||||||||||||
| 82 | 'gx', | ||||||||||||||||||||
| 83 | 'gy', | ||||||||||||||||||||
| 84 | 'invoervenster', | ||||||||||||||||||||
| 85 | 'kies', | ||||||||||||||||||||
| 86 | 'ks', | ||||||||||||||||||||
| 87 | 'lettermaat', | ||||||||||||||||||||
| 88 | 'lettertype', | ||||||||||||||||||||
| 89 | 'pendikte', | ||||||||||||||||||||
| 90 | 'penkleur', | ||||||||||||||||||||
| 91 | 'penneer', | ||||||||||||||||||||
| 92 | 'penop', | ||||||||||||||||||||
| 93 | 'pk', | ||||||||||||||||||||
| 94 | 'pm', | ||||||||||||||||||||
| 95 | 'pn', | ||||||||||||||||||||
| 96 | 'po', | ||||||||||||||||||||
| 97 | 'richting', | ||||||||||||||||||||
| 98 | 'rt', | ||||||||||||||||||||
| 99 | 'schoon', | ||||||||||||||||||||
| 100 | 'schrijf', | ||||||||||||||||||||
| 101 | 'thuis', | ||||||||||||||||||||
| 102 | 'toon', | ||||||||||||||||||||
| 103 | 'ts', | ||||||||||||||||||||
| 104 | 'verberg', | ||||||||||||||||||||
| 105 | 'voeruit', | ||||||||||||||||||||
| 106 | 'vooruit', | ||||||||||||||||||||
| 107 | 'vs', | ||||||||||||||||||||
| 108 | 'vt', | ||||||||||||||||||||
| 109 | 'wikkelaan', | ||||||||||||||||||||
| 110 | 'wikkeluit', | ||||||||||||||||||||
| 111 | ); | ||||||||||||||||||||
| 112 | 1 | $self->contextdata({ | |||||||||||||||||||
| 113 | 'Normal' => { | ||||||||||||||||||||
| 114 | callback => \&parseNormal, | ||||||||||||||||||||
| 115 | attribute => 'Normal Text', | ||||||||||||||||||||
| 116 | }, | ||||||||||||||||||||
| 117 | 'String' => { | ||||||||||||||||||||
| 118 | callback => \&parseString, | ||||||||||||||||||||
| 119 | attribute => 'String', | ||||||||||||||||||||
| 120 | }, | ||||||||||||||||||||
| 121 | }); | ||||||||||||||||||||
| 122 | 1 | $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); | |||||||||||||||||||
| 123 | 1 | $self->basecontext('Normal'); | |||||||||||||||||||
| 124 | 1 | $self->keywordscase(0); | |||||||||||||||||||
| 125 | 1 | $self->initialize; | |||||||||||||||||||
| 126 | 1 | bless ($self, $class); | |||||||||||||||||||
| 127 | 1 | return $self; | |||||||||||||||||||
| 128 | } | ||||||||||||||||||||
| 129 | |||||||||||||||||||||
| 130 | sub language { | ||||||||||||||||||||
| 131 | 0 | ▶ | return 'nl'; | ||||||||||||||||||
|
Subroutine
language: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 132 | } | ||||||||||||||||||||
| 133 | |||||||||||||||||||||
| 134 | sub parseNormal { | ||||||||||||||||||||
| 135 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseNormal: not called CC=12 SCAR=50.5
Pod
undocumented
| |||||||||||||||||||||
| 136 | # String => 'metafunctions' | ||||||||||||||||||||
| 137 | # attribute => 'MetaFunctions' | ||||||||||||||||||||
| 138 | # context => '#stay' | ||||||||||||||||||||
| 139 | # type => 'keyword' | ||||||||||||||||||||
| 140 | 0 | ▶ | if ($self->testKeyword($text, 'metafunctions', 0, undef, 0, '#stay', 'MetaFunctions')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 141 | 0 | return 1 | |||||||||||||||||||
| 142 | } | ||||||||||||||||||||
| 143 | # String => 'statements' | ||||||||||||||||||||
| 144 | # attribute => 'Statements' | ||||||||||||||||||||
| 145 | # context => '#stay' | ||||||||||||||||||||
| 146 | # type => 'keyword' | ||||||||||||||||||||
| 147 | 0 | ▶ | if ($self->testKeyword($text, 'statements', 0, undef, 0, '#stay', 'Statements')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 148 | 0 | return 1 | |||||||||||||||||||
| 149 | } | ||||||||||||||||||||
| 150 | # String => 'controllers' | ||||||||||||||||||||
| 151 | # attribute => 'Execution Controllers' | ||||||||||||||||||||
| 152 | # context => '#stay' | ||||||||||||||||||||
| 153 | # type => 'keyword' | ||||||||||||||||||||
| 154 | 0 | ▶ | if ($self->testKeyword($text, 'controllers', 0, undef, 0, '#stay', 'Execution Controllers')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 155 | 0 | return 1 | |||||||||||||||||||
| 156 | } | ||||||||||||||||||||
| 157 | # String => 'boolops' | ||||||||||||||||||||
| 158 | # attribute => 'Boolean Operators' | ||||||||||||||||||||
| 159 | # context => '#stay' | ||||||||||||||||||||
| 160 | # type => 'keyword' | ||||||||||||||||||||
| 161 | 0 | ▶ | if ($self->testKeyword($text, 'boolops', 0, undef, 0, '#stay', 'Boolean Operators')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 162 | 0 | return 1 | |||||||||||||||||||
| 163 | } | ||||||||||||||||||||
| 164 | # String => '([!=><][=]|[><])' | ||||||||||||||||||||
| 165 | # attribute => 'Expressers' | ||||||||||||||||||||
| 166 | # context => '#stay' | ||||||||||||||||||||
| 167 | # type => 'RegExpr' | ||||||||||||||||||||
| 168 | 0 | ▶ | if ($self->testRegExpr($text, '([!=><][=]|[><])', 0, 0, 0, undef, 0, '#stay', 'Expressers')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 169 | 0 | return 1 | |||||||||||||||||||
| 170 | } | ||||||||||||||||||||
| 171 | # String => '[a-zA-Z_][a-zA-Z_0-9]+' | ||||||||||||||||||||
| 172 | # attribute => 'Normal' | ||||||||||||||||||||
| 173 | # context => '#stay' | ||||||||||||||||||||
| 174 | # type => 'RegExpr' | ||||||||||||||||||||
| 175 | 0 | ▶ | if ($self->testRegExpr($text, '[a-zA-Z_][a-zA-Z_0-9]+', 0, 0, 0, undef, 0, '#stay', 'Normal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 176 | 0 | return 1 | |||||||||||||||||||
| 177 | } | ||||||||||||||||||||
| 178 | # String => '([0-9]+\.[0-9]*|\.[0-9]+)?|[0-9]*' | ||||||||||||||||||||
| 179 | # attribute => 'Number' | ||||||||||||||||||||
| 180 | # context => '#stay' | ||||||||||||||||||||
| 181 | # type => 'RegExpr' | ||||||||||||||||||||
| 182 | 0 | ▶ | if ($self->testRegExpr($text, '([0-9]+\\.[0-9]*|\\.[0-9]+)?|[0-9]*', 0, 0, 0, undef, 0, '#stay', 'Number')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 183 | 0 | return 1 | |||||||||||||||||||
| 184 | } | ||||||||||||||||||||
| 185 | # String => '#.*$' | ||||||||||||||||||||
| 186 | # attribute => 'Comment' | ||||||||||||||||||||
| 187 | # context => '#stay' | ||||||||||||||||||||
| 188 | # type => 'RegExpr' | ||||||||||||||||||||
| 189 | 0 | ▶ | if ($self->testRegExpr($text, '#.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 190 | 0 | return 1 | |||||||||||||||||||
| 191 | } | ||||||||||||||||||||
| 192 | # String => '[+*/\(\)-]' | ||||||||||||||||||||
| 193 | # attribute => 'Operator' | ||||||||||||||||||||
| 194 | # context => '#stay' | ||||||||||||||||||||
| 195 | # type => 'RegExpr' | ||||||||||||||||||||
| 196 | 0 | ▶ | if ($self->testRegExpr($text, '[+*/\\(\\)-]', 0, 0, 0, undef, 0, '#stay', 'Operator')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 197 | 0 | return 1 | |||||||||||||||||||
| 198 | } | ||||||||||||||||||||
| 199 | # String => '[\[\]]' | ||||||||||||||||||||
| 200 | # attribute => 'Scopes' | ||||||||||||||||||||
| 201 | # context => '#stay' | ||||||||||||||||||||
| 202 | # type => 'RegExpr' | ||||||||||||||||||||
| 203 | 0 | ▶ | if ($self->testRegExpr($text, '[\\[\\]]', 0, 0, 0, undef, 0, '#stay', 'Scopes')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 204 | 0 | return 1 | |||||||||||||||||||
| 205 | } | ||||||||||||||||||||
| 206 | # attribute => 'String' | ||||||||||||||||||||
| 207 | # char => '"' | ||||||||||||||||||||
| 208 | # context => 'String' | ||||||||||||||||||||
| 209 | # type => 'DetectChar' | ||||||||||||||||||||
| 210 | 0 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 211 | 0 | return 1 | |||||||||||||||||||
| 212 | } | ||||||||||||||||||||
| 213 | 0 | return 0; | |||||||||||||||||||
| 214 | }; | ||||||||||||||||||||
| 215 | |||||||||||||||||||||
| 216 | sub parseString { | ||||||||||||||||||||
| 217 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseString: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 218 | # attribute => 'String' | ||||||||||||||||||||
| 219 | # context => '#stay' | ||||||||||||||||||||
| 220 | # type => 'HlCStringChar' | ||||||||||||||||||||
| 221 | 0 | ▶ | if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 222 | 0 | return 1 | |||||||||||||||||||
| 223 | } | ||||||||||||||||||||
| 224 | # String => '%[a-zA-Z]' | ||||||||||||||||||||
| 225 | # attribute => 'Operator' | ||||||||||||||||||||
| 226 | # context => '#stay' | ||||||||||||||||||||
| 227 | # type => 'RegExpr' | ||||||||||||||||||||
| 228 | 0 | ▶ | if ($self->testRegExpr($text, '%[a-zA-Z]', 0, 0, 0, undef, 0, '#stay', 'Operator')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 229 | 0 | return 1 | |||||||||||||||||||
| 230 | } | ||||||||||||||||||||
| 231 | # attribute => 'String' | ||||||||||||||||||||
| 232 | # char => '"' | ||||||||||||||||||||
| 233 | # context => '#pop' | ||||||||||||||||||||
| 234 | # type => 'DetectChar' | ||||||||||||||||||||
| 235 | 0 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 236 | 0 | return 1 | |||||||||||||||||||
| 237 | } | ||||||||||||||||||||
| 238 | 0 | return 0; | |||||||||||||||||||
| 239 | }; | ||||||||||||||||||||
| 240 | |||||||||||||||||||||
| 241 | |||||||||||||||||||||
| 242 | 1 | 1; | |||||||||||||||||||
| 243 | |||||||||||||||||||||
| 244 | __END__ | ||||||||||||||||||||