| 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 'desktop.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::Desktop; |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.14'; |
|
15
|
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
488
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
24
|
|
|
17
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
22
|
|
|
18
|
1
|
|
|
1
|
|
5
|
use base('Syntax::Highlight::Engine::Kate::Template'); |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
347
|
|
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub new { |
|
21
|
2
|
|
|
2
|
0
|
449
|
my $proto = shift; |
|
22
|
2
|
|
33
|
|
|
10
|
my $class = ref($proto) || $proto; |
|
23
|
2
|
|
|
|
|
9
|
my $self = $class->SUPER::new(@_); |
|
24
|
2
|
|
|
|
|
11
|
$self->attributes({ |
|
25
|
|
|
|
|
|
|
'Comment' => 'Comment', |
|
26
|
|
|
|
|
|
|
'Key' => 'DataType', |
|
27
|
|
|
|
|
|
|
'Language' => 'DecVal', |
|
28
|
|
|
|
|
|
|
'Normal Text' => 'Normal', |
|
29
|
|
|
|
|
|
|
'Section' => 'Keyword', |
|
30
|
|
|
|
|
|
|
}); |
|
31
|
2
|
|
|
|
|
14
|
$self->contextdata({ |
|
32
|
|
|
|
|
|
|
'Comment' => { |
|
33
|
|
|
|
|
|
|
callback => \&parseComment, |
|
34
|
|
|
|
|
|
|
attribute => 'Comment', |
|
35
|
|
|
|
|
|
|
lineending => '#pop', |
|
36
|
|
|
|
|
|
|
}, |
|
37
|
|
|
|
|
|
|
'Normal' => { |
|
38
|
|
|
|
|
|
|
callback => \&parseNormal, |
|
39
|
|
|
|
|
|
|
attribute => 'Key', |
|
40
|
|
|
|
|
|
|
}, |
|
41
|
|
|
|
|
|
|
'Value' => { |
|
42
|
|
|
|
|
|
|
callback => \&parseValue, |
|
43
|
|
|
|
|
|
|
attribute => 'Normal Text', |
|
44
|
|
|
|
|
|
|
lineending => '#pop', |
|
45
|
|
|
|
|
|
|
}, |
|
46
|
|
|
|
|
|
|
}); |
|
47
|
2
|
|
|
|
|
8
|
$self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); |
|
48
|
2
|
|
|
|
|
6
|
$self->basecontext('Normal'); |
|
49
|
2
|
|
|
|
|
7
|
$self->keywordscase(1); |
|
50
|
2
|
|
|
|
|
4
|
$self->initialize; |
|
51
|
2
|
|
|
|
|
3
|
bless ($self, $class); |
|
52
|
2
|
|
|
|
|
8
|
return $self; |
|
53
|
|
|
|
|
|
|
} |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub language { |
|
56
|
0
|
|
|
0
|
0
|
0
|
return '.desktop'; |
|
57
|
|
|
|
|
|
|
} |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub parseComment { |
|
60
|
0
|
|
|
0
|
0
|
0
|
my ($self, $text) = @_; |
|
61
|
0
|
|
|
|
|
0
|
return 0; |
|
62
|
|
|
|
|
|
|
}; |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub parseNormal { |
|
65
|
364
|
|
|
364
|
0
|
512
|
my ($self, $text) = @_; |
|
66
|
|
|
|
|
|
|
# String => '\[.*\]$' |
|
67
|
|
|
|
|
|
|
# attribute => 'Section' |
|
68
|
|
|
|
|
|
|
# beginRegion => 'Section' |
|
69
|
|
|
|
|
|
|
# column => '0' |
|
70
|
|
|
|
|
|
|
# context => '#stay' |
|
71
|
|
|
|
|
|
|
# endRegion => 'Section' |
|
72
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
73
|
364
|
50
|
|
|
|
642
|
if ($self->testRegExpr($text, '\\[.*\\]$', 0, 0, 0, 0, 0, '#stay', 'Section')) { |
|
74
|
0
|
|
|
|
|
0
|
return 1 |
|
75
|
|
|
|
|
|
|
} |
|
76
|
|
|
|
|
|
|
# String => '\[.*\]' |
|
77
|
|
|
|
|
|
|
# attribute => 'Language' |
|
78
|
|
|
|
|
|
|
# context => 'Value' |
|
79
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
80
|
364
|
100
|
|
|
|
800
|
if ($self->testRegExpr($text, '\\[.*\\]', 0, 0, 0, undef, 0, 'Value', 'Language')) { |
|
81
|
8
|
|
|
|
|
18
|
return 1 |
|
82
|
|
|
|
|
|
|
} |
|
83
|
|
|
|
|
|
|
# attribute => 'Comment' |
|
84
|
|
|
|
|
|
|
# char => '#' |
|
85
|
|
|
|
|
|
|
# context => 'Comment' |
|
86
|
|
|
|
|
|
|
# firstNonSpace => 'true' |
|
87
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
88
|
356
|
50
|
|
|
|
805
|
if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 1, 'Comment', 'Comment')) { |
|
89
|
0
|
|
|
|
|
0
|
return 1 |
|
90
|
|
|
|
|
|
|
} |
|
91
|
|
|
|
|
|
|
# attribute => 'Normal Text' |
|
92
|
|
|
|
|
|
|
# char => '=' |
|
93
|
|
|
|
|
|
|
# context => 'Value' |
|
94
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
95
|
356
|
100
|
|
|
|
684
|
if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, 'Value', 'Normal Text')) { |
|
96
|
30
|
|
|
|
|
58
|
return 1 |
|
97
|
|
|
|
|
|
|
} |
|
98
|
326
|
|
|
|
|
546
|
return 0; |
|
99
|
|
|
|
|
|
|
}; |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
sub parseValue { |
|
102
|
272
|
|
|
272
|
0
|
370
|
my ($self, $text) = @_; |
|
103
|
272
|
|
|
|
|
472
|
return 0; |
|
104
|
|
|
|
|
|
|
}; |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
1; |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
__END__ |