line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
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 'alert.xml' file of the syntax highlight |
6
|
|
|
|
|
|
|
# engine of the kate text editor (http://www.kate-editor.org |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#kate xml version 1.06 |
9
|
|
|
|
|
|
|
#kate version 2.3 |
10
|
|
|
|
|
|
|
#kate author Dominik Haumann (dhdev@gmx.de) |
11
|
|
|
|
|
|
|
#generated: Sun Feb 3 22:02:04 2008, localtime |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
package Syntax::Highlight::Engine::Kate::Alerts; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $VERSION = '0.07'; |
16
|
|
|
|
|
|
|
|
17
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
85
|
|
18
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
75
|
|
19
|
2
|
|
|
2
|
|
11
|
use base('Syntax::Highlight::Engine::Kate::Template'); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
672
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub new { |
22
|
17
|
|
|
17
|
0
|
798
|
my $proto = shift; |
23
|
17
|
|
33
|
|
|
115
|
my $class = ref($proto) || $proto; |
24
|
17
|
|
|
|
|
1295
|
my $self = $class->SUPER::new(@_); |
25
|
17
|
|
|
|
|
156
|
$self->attributes({ |
26
|
|
|
|
|
|
|
'Alert' => 'Alert', |
27
|
|
|
|
|
|
|
'Normal Text' => 'Normal', |
28
|
|
|
|
|
|
|
}); |
29
|
17
|
|
|
|
|
130
|
$self->listAdd('alerts', |
30
|
|
|
|
|
|
|
'###', |
31
|
|
|
|
|
|
|
'FIXME', |
32
|
|
|
|
|
|
|
'HACK', |
33
|
|
|
|
|
|
|
'NOTE', |
34
|
|
|
|
|
|
|
'NOTICE', |
35
|
|
|
|
|
|
|
'TASK', |
36
|
|
|
|
|
|
|
'TODO', |
37
|
|
|
|
|
|
|
); |
38
|
17
|
|
|
|
|
193
|
$self->contextdata({ |
39
|
|
|
|
|
|
|
'Normal Text' => { |
40
|
|
|
|
|
|
|
callback => \&parseNormalText, |
41
|
|
|
|
|
|
|
attribute => 'Normal Text', |
42
|
|
|
|
|
|
|
lineending => '#pop', |
43
|
|
|
|
|
|
|
}, |
44
|
|
|
|
|
|
|
}); |
45
|
17
|
|
|
|
|
109
|
$self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); |
46
|
17
|
|
|
|
|
109
|
$self->basecontext('Normal Text'); |
47
|
17
|
|
|
|
|
93
|
$self->keywordscase(0); |
48
|
17
|
|
|
|
|
108
|
$self->initialize; |
49
|
17
|
|
|
|
|
55
|
bless ($self, $class); |
50
|
17
|
|
|
|
|
141
|
return $self; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub language { |
54
|
0
|
|
|
0
|
0
|
0
|
return 'Alerts'; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub parseNormalText { |
58
|
14117
|
|
|
14117
|
0
|
20847
|
my ($self, $text) = @_; |
59
|
|
|
|
|
|
|
# String => 'alerts' |
60
|
|
|
|
|
|
|
# attribute => 'Alert' |
61
|
|
|
|
|
|
|
# context => '#stay' |
62
|
|
|
|
|
|
|
# type => 'keyword' |
63
|
14117
|
100
|
|
|
|
44089
|
if ($self->testKeyword($text, 'alerts', 0, undef, 0, '#stay', 'Alert')) { |
64
|
16
|
|
|
|
|
85
|
return 1 |
65
|
|
|
|
|
|
|
} |
66
|
14101
|
|
|
|
|
69727
|
return 0; |
67
|
|
|
|
|
|
|
}; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
1; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
__END__ |