| 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 | 1 | our $VERSION = '0.16'; | |||||||||||||||||||
| 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 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||
| 21 | 2 | my $proto = shift; | |||||||||||||||||||
| 22 | 2 | ▶ | 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 | 2 | my $self = $class->SUPER::new(@_); | |||||||||||||||||||
| 24 | 2 | $self->attributes({ | |||||||||||||||||||
| 25 | 'Comment' => 'Comment', | ||||||||||||||||||||
| 26 | 'Key' => 'DataType', | ||||||||||||||||||||
| 27 | 'Language' => 'DecVal', | ||||||||||||||||||||
| 28 | 'Normal Text' => 'Normal', | ||||||||||||||||||||
| 29 | 'Section' => 'Keyword', | ||||||||||||||||||||
| 30 | }); | ||||||||||||||||||||
| 31 | 2 | $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 | $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); | |||||||||||||||||||
| 48 | 2 | $self->basecontext('Normal'); | |||||||||||||||||||
| 49 | 2 | $self->keywordscase(1); | |||||||||||||||||||
| 50 | 2 | $self->initialize; | |||||||||||||||||||
| 51 | 2 | bless ($self, $class); | |||||||||||||||||||
| 52 | 2 | return $self; | |||||||||||||||||||
| 53 | } | ||||||||||||||||||||
| 54 | |||||||||||||||||||||
| 55 | 0 | ▶ | sub language { | ||||||||||||||||||
|
Subroutine
language: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 56 | 0 | return '.desktop'; | |||||||||||||||||||
| 57 | } | ||||||||||||||||||||
| 58 | |||||||||||||||||||||
| 59 | 0 | ▶ | sub parseComment { | ||||||||||||||||||
|
Subroutine
parseComment: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 60 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 61 | 0 | return 0; | |||||||||||||||||||
| 62 | }; | ||||||||||||||||||||
| 63 | |||||||||||||||||||||
| 64 | 364 | ▶ | sub parseNormal { | ||||||||||||||||||
|
Subroutine
parseNormal: called CC=5 SCAR=16.6
Pod
undocumented
| |||||||||||||||||||||
| 65 | 364 | 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 | ▶ | if ($self->testRegExpr($text, '\\[.*\\]$', 0, 0, 0, 0, 0, '#stay', 'Section')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 74 | 0 | return 1 | |||||||||||||||||||
| 75 | } | ||||||||||||||||||||
| 76 | # String => '\[.*\]' | ||||||||||||||||||||
| 77 | # attribute => 'Language' | ||||||||||||||||||||
| 78 | # context => 'Value' | ||||||||||||||||||||
| 79 | # type => 'RegExpr' | ||||||||||||||||||||
| 80 | 364 | ▶ | if ($self->testRegExpr($text, '\\[.*\\]', 0, 0, 0, undef, 0, 'Value', 'Language')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 81 | 8 | return 1 | |||||||||||||||||||
| 82 | } | ||||||||||||||||||||
| 83 | # attribute => 'Comment' | ||||||||||||||||||||
| 84 | # char => '#' | ||||||||||||||||||||
| 85 | # context => 'Comment' | ||||||||||||||||||||
| 86 | # firstNonSpace => 'true' | ||||||||||||||||||||
| 87 | # type => 'DetectChar' | ||||||||||||||||||||
| 88 | 356 | ▶ | if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 1, 'Comment', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 89 | 0 | return 1 | |||||||||||||||||||
| 90 | } | ||||||||||||||||||||
| 91 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 92 | # char => '=' | ||||||||||||||||||||
| 93 | # context => 'Value' | ||||||||||||||||||||
| 94 | # type => 'DetectChar' | ||||||||||||||||||||
| 95 | 356 | ▶ | if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, 'Value', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 96 | 30 | return 1 | |||||||||||||||||||
| 97 | } | ||||||||||||||||||||
| 98 | 326 | return 0; | |||||||||||||||||||
| 99 | }; | ||||||||||||||||||||
| 100 | |||||||||||||||||||||
| 101 | 272 | ▶ | sub parseValue { | ||||||||||||||||||
|
Subroutine
parseValue: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 102 | 272 | my ($self, $text) = @_; | |||||||||||||||||||
| 103 | 272 | return 0; | |||||||||||||||||||
| 104 | }; | ||||||||||||||||||||
| 105 | |||||||||||||||||||||
| 106 | |||||||||||||||||||||
| 107 | 1 | 1; | |||||||||||||||||||
| 108 | |||||||||||||||||||||
| 109 | __END__ | ||||||||||||||||||||