1
package Padre::Document::CSharp::FunctionList;
6
use Padre::Task::FunctionList ();
9
our @ISA = 'Padre::Task::FunctionList';
11
######################################################################
12
# Padre::Task::FunctionList Methods
15
qr{\cM?\cJ}; # recognize newline even if encoding is not the platform default (will not work for MacOS classic)
16
my $method_search_regex = qr{
17
/\*.+?\*/ # block comment
19
\/\/.+?$newline # line comment
21
(?:^|$newline) # text start or newline
24
(?: \[ [\s\w()]+ \]\s* )? # optional annotations
26
(?: public|protected|private|
27
abstract|static|sealed|virtual|override|
32
){0,4} # zero to 2 method modifiers
33
(?: [\w\[\]<>,]+) # return data type
36
(?: <\w+>)? # optional: generic type parameter
38
\(.*?\) # parentheses around the parameters
43
return grep { defined $_ } $_[1] =~ /$method_search_regex/g;
48
# Copyright 2008-2011 The Padre development team as listed in Padre.pm.
50
# This program is free software; you can redistribute it and/or
51
# modify it under the same terms as Perl 5 itself.