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.12'; |
16
|
|
|
|
|
|
|
|
17
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
52
|
|
18
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
66
|
|
19
|
2
|
|
|
2
|
|
9
|
use base('Syntax::Highlight::Engine::Kate::Template'); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
507
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub new { |
22
|
18
|
|
|
18
|
0
|
885
|
my $proto = shift; |
23
|
18
|
|
33
|
|
|
102
|
my $class = ref($proto) || $proto; |
24
|
18
|
|
|
|
|
100
|
my $self = $class->SUPER::new(@_); |
25
|
18
|
|
|
|
|
123
|
$self->attributes({ |
26
|
|
|
|
|
|
|
'Alert' => 'Alert', |
27
|
|
|
|
|
|
|
'Normal Text' => 'Normal', |
28
|
|
|
|
|
|
|
}); |
29
|
18
|
|
|
|
|
96
|
$self->listAdd('alerts', |
30
|
|
|
|
|
|
|
'###', |
31
|
|
|
|
|
|
|
'FIXME', |
32
|
|
|
|
|
|
|
'HACK', |
33
|
|
|
|
|
|
|
'NOTE', |
34
|
|
|
|
|
|
|
'NOTICE', |
35
|
|
|
|
|
|
|
'TASK', |
36
|
|
|
|
|
|
|
'TODO', |
37
|
|
|
|
|
|
|
); |
38
|
18
|
|
|
|
|
162
|
$self->contextdata({ |
39
|
|
|
|
|
|
|
'Normal Text' => { |
40
|
|
|
|
|
|
|
callback => \&parseNormalText, |
41
|
|
|
|
|
|
|
attribute => 'Normal Text', |
42
|
|
|
|
|
|
|
lineending => '#pop', |
43
|
|
|
|
|
|
|
}, |
44
|
|
|
|
|
|
|
}); |
45
|
18
|
|
|
|
|
88
|
$self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); |
46
|
18
|
|
|
|
|
86
|
$self->basecontext('Normal Text'); |
47
|
18
|
|
|
|
|
80
|
$self->keywordscase(0); |
48
|
18
|
|
|
|
|
56
|
$self->initialize; |
49
|
18
|
|
|
|
|
45
|
bless ($self, $class); |
50
|
18
|
|
|
|
|
128
|
return $self; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub language { |
54
|
0
|
|
|
0
|
0
|
0
|
return 'Alerts'; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub parseNormalText { |
58
|
14140
|
|
|
14140
|
0
|
24720
|
my ($self, $text) = @_; |
59
|
|
|
|
|
|
|
# String => 'alerts' |
60
|
|
|
|
|
|
|
# attribute => 'Alert' |
61
|
|
|
|
|
|
|
# context => '#stay' |
62
|
|
|
|
|
|
|
# type => 'keyword' |
63
|
14140
|
100
|
|
|
|
37956
|
if ($self->testKeyword($text, 'alerts', 0, undef, 0, '#stay', 'Alert')) { |
64
|
16
|
|
|
|
|
62
|
return 1 |
65
|
|
|
|
|
|
|
} |
66
|
14124
|
|
|
|
|
46712
|
return 0; |
67
|
|
|
|
|
|
|
}; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
1; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
__END__ |