|
@@ -28,9 +28,18 @@ import (
|
28
|
28
|
)
|
29
|
29
|
|
30
|
30
|
var (
|
31
|
|
- javaRegExp = regexp.MustCompile(`^(?:[a-z]\w*\.)*([A-Z][\w\$]*\.(?:<init>|[a-z][\w\$]*(?:\$\d+)?))(?:(?:\()|$)`)
|
32
|
|
- goRegExp = regexp.MustCompile(`^(?:[\w\-\.]+\/)+(.+)`)
|
33
|
|
- cppRegExp = regexp.MustCompile(`^(?:[_a-zA-Z]\w*::)+(_*[A-Z]\w*::~?[_a-zA-Z]\w*)`)
|
|
31
|
+ // Removes package name and method arugments for Java method names.
|
|
32
|
+ // See tests for examples.
|
|
33
|
+ javaRegExp = regexp.MustCompile(`^(?:[a-z]\w*\.)*([A-Z][\w\$]*\.(?:<init>|[a-z][\w\$]*(?:\$\d+)?))(?:(?:\()|$)`)
|
|
34
|
+ // Removes package name and method arugments for Go function names.
|
|
35
|
+ // See tests for examples.
|
|
36
|
+ goRegExp = regexp.MustCompile(`^(?:[\w\-\.]+\/)+(.+)`)
|
|
37
|
+ // Strips C++ namespace prefix from a C++ function / method name.
|
|
38
|
+ // NOTE: Make sure to keep the template parameters in the name. Normally,
|
|
39
|
+ // template parameters are stripped from the C++ names but when
|
|
40
|
+ // -symbolize=demangle=templates flag is used, they will not be.
|
|
41
|
+ // See tests for examples.
|
|
42
|
+ cppRegExp = regexp.MustCompile(`^(?:[_a-zA-Z]\w*::)+(_*[A-Z]\w*::~?[_a-zA-Z]\w*(?:<.*>)?)`)
|
34
|
43
|
cppAnonymousPrefixRegExp = regexp.MustCompile(`^\(anonymous namespace\)::`)
|
35
|
44
|
)
|
36
|
45
|
|