summaryrefslogtreecommitdiffstats
path: root/src/pyscanner.l
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2015-12-26 18:37:14 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2015-12-26 18:37:14 (GMT)
commitdd75c0ca7d5bbb42e34a636cf35f558105063e70 (patch)
treee8f00349dd33215fb551d65575a7b0bbadbab5ea /src/pyscanner.l
parent303b5b58955fd7122fe361d5146f6a9334a41997 (diff)
parent322d09de48c07cf7258825e3e7733d5d994e70cf (diff)
downloadDoxygen-dd75c0ca7d5bbb42e34a636cf35f558105063e70.zip
Doxygen-dd75c0ca7d5bbb42e34a636cf35f558105063e70.tar.gz
Doxygen-dd75c0ca7d5bbb42e34a636cf35f558105063e70.tar.bz2
Merge pull request #427 from albert-github/feature/bug_641036
Bug 641036 - python script with #!/usr/bin/python are not documented correctly
Diffstat (limited to 'src/pyscanner.l')
-rw-r--r--src/pyscanner.l4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pyscanner.l b/src/pyscanner.l
index c73e7dc..e287aad 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -487,6 +487,7 @@ STRINGPREFIX ("r"|"u"|"ur"|"R"|"U"|"UR"|"Ur"|"uR")
KEYWORD ("lambda"|"import"|"class"|"assert"|"as"|"from"|"global"|"def"|"True"|"False")
FLOWKW ("or"|"and"|"is"|"not"|"print"|"for"|"in"|"if"|"try"|"except"|"yield"|"raise"|"break"|"continue"|"pass"|"if"|"return"|"while"|"elif"|"else"|"finally")
POUNDCOMMENT "#"[^#\n][^\n]*
+SCRIPTCOMMENT "#!".*
STARTDOCSYMS "##"
@@ -609,6 +610,9 @@ STARTDOCSYMS "##"
"@staticmethod" {
gstat=TRUE;
}
+ {SCRIPTCOMMENT} { // Unix type script comment
+ if (yyLineNr != 1) REJECT;
+ }
{POUNDCOMMENT} { // normal comment
g_packageCommentAllowed = FALSE;
}