summaryrefslogtreecommitdiffstats
path: root/src/pyscanner.l
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2006-02-04 15:33:47 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2006-02-04 15:33:47 (GMT)
commit8b0ae7ca77a14eef79e972d6061a9470de9ae458 (patch)
tree2d45018d20008480ccea03a78fa6fc37908676d9 /src/pyscanner.l
parente6060ed25b457ae558711d1341bf1c96b093ee99 (diff)
downloadDoxygen-8b0ae7ca77a14eef79e972d6061a9470de9ae458.zip
Doxygen-8b0ae7ca77a14eef79e972d6061a9470de9ae458.tar.gz
Doxygen-8b0ae7ca77a14eef79e972d6061a9470de9ae458.tar.bz2
Release-1.4.6-20060202
Diffstat (limited to 'src/pyscanner.l')
-rw-r--r--src/pyscanner.l17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/pyscanner.l b/src/pyscanner.l
index 15caa43..d29b2c1 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -154,6 +154,20 @@ static void newVariable()
newEntry();
}
+static void newFunction()
+{
+ if (current->name.left(2)=="__" && current->name.right(2)=="__")
+ {
+ // special method name, see
+ // http://docs.python.org/ref/specialnames.html
+ current->protection=Public;
+ }
+ else if (current->name.at(0)=='_')
+ {
+ current->protection=Private;
+ }
+}
+
static inline int computeIndent(const char *s)
{
int col=0;
@@ -804,6 +818,7 @@ STARTDOCSYMS ^{B}"##"/[^#]
}
current->name = yytext;
current->name = current->name.stripWhiteSpace();
+ newFunction();
}
{B}"(" {
@@ -984,7 +999,7 @@ STARTDOCSYMS ^{B}"##"/[^#]
}
<ClassInheritance>{
- ({BB}|[(,)]) { // syntactic sugar for the list
+ ({BB}|[\(,\)]) { // syntactic sugar for the list
}
":" { // begin of the class definition