~ubuntu-branches/ubuntu/saucy/padre/saucy-proposed

« back to all changes in this revision

Viewing changes to lib/Padre/Document/CSharp.pm

  • Committer: Package Import Robot
  • Author(s): Dominique Dumont, gregor herrmann, Dominique Dumont
  • Date: 2012-01-04 12:04:20 UTC
  • mfrom: (1.3.3)
  • Revision ID: package-import@ubuntu.com-20120104120420-i5oybqwf91m1d3il
Tags: 0.92.ds1-1
[ gregor herrmann ]
* Remove debian/source/local-options; abort-on-upstream-changes
  and unapply-patches are default in dpkg-source since 1.16.1.
* Swap order of alternative (build) dependencies after the perl
  5.14 transition.

[ Dominique Dumont ]
* Imported Upstream version 0.92.ds1
* removed fix-spelling patch (applied upstream)
* lintian-override: use wildcard to avoid listing a gazillion files
* updated size of some 'not-real-man-page' entries
* rules: remove dekstop cruft (replaced by a file provided in debian
  directory)
* control: removed Breaks statement. Add /me to uploaders. Updated
  dependencies
* rules: make sure that non-DFSG file (i.e. the cute butterfly, sigh)
  is not distributed

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package Padre::Document::CSharp;
 
2
 
 
3
use 5.008;
 
4
use strict;
 
5
use warnings;
 
6
use Padre::Constant   ();
 
7
use Padre::Role::Task ();
 
8
use Padre::Document   ();
 
9
 
 
10
our $VERSION = '0.92';
 
11
our @ISA     = qw{
 
12
        Padre::Role::Task
 
13
        Padre::Document
 
14
};
 
15
 
 
16
 
 
17
#####################################################################
 
18
# Padre::Document Task Integration
 
19
 
 
20
sub task_functions {
 
21
        return 'Padre::Document::CSharp::FunctionList';
 
22
}
 
23
 
 
24
sub task_outline {
 
25
        return undef;
 
26
}
 
27
 
 
28
sub task_syntax {
 
29
        return undef;
 
30
}
 
31
 
 
32
sub get_function_regex {
 
33
        my $name = quotemeta $_[1];
 
34
        return qr/
 
35
                (?:^|[^# \t-])
 
36
                [ \t]*
 
37
                ((?: (public|protected|private|
 
38
                      abstract|static|sealed|virtual|override|
 
39
                      explicit|implicit|operator|extern)\s+)
 
40
                     {0,4}             # zero to 4 method modifiers
 
41
                     (?: [\w\[\]<>,]+) # return data type
 
42
                     \s+
 
43
                     $name
 
44
                     (?: <\w+>)?        # optional: generic type parameter
 
45
                )
 
46
                /x;
 
47
}
 
48
 
 
49
# C# keyword list is obtained from src/scite/src/cpp.properties
 
50
# added missing keyword volatile
 
51
sub scintilla_key_words {
 
52
        return [
 
53
                [
 
54
 
 
55
                        # C# keywords
 
56
                        qw{
 
57
                                abstract as base bool break by byte case catch char
 
58
                                checked class const continue decimal default delegate
 
59
                                do double else enum equals event explicit extern
 
60
                                false finally fixed float for foreach goto if
 
61
                                implicit in int interface internal into is lock long
 
62
                                namespace new null object on operator out override
 
63
                                params private protected public readonly ref return sbyte
 
64
                                sealed short sizeof stackalloc static string struct
 
65
                                switch this throw true try typeof uint ulong unchecked unsafe
 
66
                                ushort using virtual void volatile while
 
67
                                },
 
68
 
 
69
                        # C# contextual keywords
 
70
                        qw{
 
71
                                add alias ascending descending dynamic from
 
72
                                get global group into join let orderby partial
 
73
                                remove select set value var where yield
 
74
                                }
 
75
                ]
 
76
        ];
 
77
}
 
78
 
 
79
1;
 
80
 
 
81
# Copyright 2008-2011 The Padre development team as listed in Padre.pm.
 
82
# LICENSE
 
83
# This program is free software; you can redistribute it and/or
 
84
# modify it under the same terms as Perl 5 itself.