| 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 'changelog.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 | #kate author Dominik Haumann (dhdev@gmx.de) | ||||||||||||||||||||
| 11 | #generated: Sun Feb 3 22:02:04 2008, localtime | ||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | package Syntax::Highlight::Engine::Kate::ChangeLog; | ||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 1 | our $VERSION = '0.14'; | |||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 18 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 19 | 1 | ▶ | use base('Syntax::Highlight::Engine::Kate::Template'); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | sub new { | ||||||||||||||||||||
| 22 | 1 | ▶ | my $proto = shift; | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||
| 23 | 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
| |||||||||||||||||||||
| 24 | 1 | my $self = $class->SUPER::new(@_); | |||||||||||||||||||
| 25 | 1 | $self->attributes({ | |||||||||||||||||||
| 26 | 'Date' => 'DataType', | ||||||||||||||||||||
| 27 | 'E-Mail' => 'Others', | ||||||||||||||||||||
| 28 | 'Entry' => 'DecVal', | ||||||||||||||||||||
| 29 | 'Name' => 'Keyword', | ||||||||||||||||||||
| 30 | 'Normal Text' => 'Normal', | ||||||||||||||||||||
| 31 | }); | ||||||||||||||||||||
| 32 | 1 | $self->contextdata({ | |||||||||||||||||||
| 33 | 'Normal' => { | ||||||||||||||||||||
| 34 | callback => \&parseNormal, | ||||||||||||||||||||
| 35 | attribute => 'Normal Text', | ||||||||||||||||||||
| 36 | }, | ||||||||||||||||||||
| 37 | 'entry' => { | ||||||||||||||||||||
| 38 | callback => \&parseentry, | ||||||||||||||||||||
| 39 | attribute => 'Normal Text', | ||||||||||||||||||||
| 40 | lineending => '#pop', | ||||||||||||||||||||
| 41 | }, | ||||||||||||||||||||
| 42 | 'line' => { | ||||||||||||||||||||
| 43 | callback => \&parseline, | ||||||||||||||||||||
| 44 | attribute => 'Normal Text', | ||||||||||||||||||||
| 45 | lineending => '#pop', | ||||||||||||||||||||
| 46 | }, | ||||||||||||||||||||
| 47 | }); | ||||||||||||||||||||
| 48 | 1 | $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); | |||||||||||||||||||
| 49 | 1 | $self->basecontext('Normal'); | |||||||||||||||||||
| 50 | 1 | $self->keywordscase(0); | |||||||||||||||||||
| 51 | 1 | $self->initialize; | |||||||||||||||||||
| 52 | 1 | bless ($self, $class); | |||||||||||||||||||
| 53 | 1 | return $self; | |||||||||||||||||||
| 54 | } | ||||||||||||||||||||
| 55 | |||||||||||||||||||||
| 56 | sub language { | ||||||||||||||||||||
| 57 | 0 | ▶ | return 'ChangeLog'; | ||||||||||||||||||
|
Subroutine
language: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 58 | } | ||||||||||||||||||||
| 59 | |||||||||||||||||||||
| 60 | sub parseNormal { | ||||||||||||||||||||
| 61 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseNormal: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 62 | # attribute => 'Entry' | ||||||||||||||||||||
| 63 | # char => '*' | ||||||||||||||||||||
| 64 | # context => 'entry' | ||||||||||||||||||||
| 65 | # firstNonSpace => 'true' | ||||||||||||||||||||
| 66 | # type => 'DetectChar' | ||||||||||||||||||||
| 67 | 0 | ▶ | if ($self->testDetectChar($text, '*', 0, 0, 0, undef, 1, 'entry', 'Entry')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 68 | 0 | return 1 | |||||||||||||||||||
| 69 | } | ||||||||||||||||||||
| 70 | # String => '\d\d\d\d\s*-\s*\d\d\s*-\s*\d\d\s*' | ||||||||||||||||||||
| 71 | # attribute => 'Date' | ||||||||||||||||||||
| 72 | # column => '0' | ||||||||||||||||||||
| 73 | # context => 'line' | ||||||||||||||||||||
| 74 | # type => 'RegExpr' | ||||||||||||||||||||
| 75 | 0 | ▶ | if ($self->testRegExpr($text, '\\d\\d\\d\\d\\s*-\\s*\\d\\d\\s*-\\s*\\d\\d\\s*', 0, 0, 0, 0, 0, 'line', 'Date')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 76 | 0 | return 1 | |||||||||||||||||||
| 77 | } | ||||||||||||||||||||
| 78 | 0 | return 0; | |||||||||||||||||||
| 79 | }; | ||||||||||||||||||||
| 80 | |||||||||||||||||||||
| 81 | sub parseentry { | ||||||||||||||||||||
| 82 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseentry: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 83 | # String => '.*:' | ||||||||||||||||||||
| 84 | # attribute => 'Entry' | ||||||||||||||||||||
| 85 | # context => '#pop' | ||||||||||||||||||||
| 86 | # minimal => 'true' | ||||||||||||||||||||
| 87 | # type => 'RegExpr' | ||||||||||||||||||||
| 88 | 0 | ▶ | if ($self->testRegExpr($text, '.*?:', 0, 0, 0, undef, 0, '#pop', 'Entry')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 89 | 0 | return 1 | |||||||||||||||||||
| 90 | } | ||||||||||||||||||||
| 91 | 0 | return 0; | |||||||||||||||||||
| 92 | }; | ||||||||||||||||||||
| 93 | |||||||||||||||||||||
| 94 | sub parseline { | ||||||||||||||||||||
| 95 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseline: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 96 | # String => '(\w\s*)+' | ||||||||||||||||||||
| 97 | # attribute => 'Name' | ||||||||||||||||||||
| 98 | # context => '#stay' | ||||||||||||||||||||
| 99 | # type => 'RegExpr' | ||||||||||||||||||||
| 100 | 0 | ▶ | if ($self->testRegExpr($text, '(\\w\\s*)+', 0, 0, 0, undef, 0, '#stay', 'Name')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 101 | 0 | return 1 | |||||||||||||||||||
| 102 | } | ||||||||||||||||||||
| 103 | # String => '<.*>\s*$' | ||||||||||||||||||||
| 104 | # attribute => 'E-Mail' | ||||||||||||||||||||
| 105 | # context => '#pop' | ||||||||||||||||||||
| 106 | # type => 'RegExpr' | ||||||||||||||||||||
| 107 | 0 | ▶ | if ($self->testRegExpr($text, '<.*>\\s*$', 0, 0, 0, undef, 0, '#pop', 'E-Mail')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 108 | 0 | return 1 | |||||||||||||||||||
| 109 | } | ||||||||||||||||||||
| 110 | 0 | return 0; | |||||||||||||||||||
| 111 | }; | ||||||||||||||||||||
| 112 | |||||||||||||||||||||
| 113 | |||||||||||||||||||||
| 114 | 1 | 1; | |||||||||||||||||||
| 115 | |||||||||||||||||||||
| 116 | __END__ | ||||||||||||||||||||