summaryrefslogtreecommitdiffstats
path: root/src/pyscanner.l
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2006-02-04 15:33:47 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2006-02-04 15:33:47 (GMT)
commita9a600c4692a1d0b0a6a09362db1d6da8bda9a30 (patch)
tree2d45018d20008480ccea03a78fa6fc37908676d9 /src/pyscanner.l
parent0165662ac50544cad138573c42097999327b84bc (diff)
downloadDoxygen-a9a600c4692a1d0b0a6a09362db1d6da8bda9a30.zip
Doxygen-a9a600c4692a1d0b0a6a09362db1d6da8bda9a30.tar.gz
Doxygen-a9a600c4692a1d0b0a6a09362db1d6da8bda9a30.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