summaryrefslogtreecommitdiffstats
path: root/src/pyscanner.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/pyscanner.l')
-rw-r--r--src/pyscanner.l16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/pyscanner.l b/src/pyscanner.l
index d7996b4..4a9552e 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -113,6 +113,7 @@ struct pyscannerYY_state
int search_count = 0;
QCString argType;
bool funcParamsEnd = FALSE;
+ std::vector<QCString> decorators;
};
//-----------------------------------------------------------------------------
@@ -175,6 +176,7 @@ NONEMPTYEXP [^ \t\n:]
PARAMNONEMPTY [^ \t\n():]
IDENTIFIER ({LETTER}|"_")({LETTER}|{DIGIT}|"_")*
SCOPE {IDENTIFIER}("."{IDENTIFIER})*
+CALL "("[^)]*")"
BORDER ([^A-Za-z0-9])
TRISINGLEQUOTE {STRINGPREFIX}?"'''"(!)?
@@ -335,6 +337,8 @@ STARTDOCSYMS "##"
"@staticmethod" {
yyextra->stat=TRUE;
}
+ "@"{SCOPE}{CALL}? { // decorator
+ }
{SCRIPTCOMMENT} { // Unix type script comment
if (yyextra->yyLineNr != 1) REJECT;
}
@@ -651,6 +655,7 @@ STARTDOCSYMS "##"
{B}":"{B} { // function without arguments
yyextra->specialBlock = TRUE; // expecting a docstring
yyextra->bodyEntry = yyextra->current;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
BEGIN(FunctionBody);
}
@@ -1322,7 +1327,6 @@ STARTDOCSYMS "##"
\n/{B}"#" { // continuation of the comment on the next line
yyextra->docBlock+='\n';
yyextra->docBrief = FALSE;
- startCommentBlock(yyscanner,FALSE);
incLineNr(yyscanner);
}
[^#\n]+ { // any other stuff
@@ -1426,7 +1430,7 @@ STARTDOCSYMS "##"
}
<*>"'" {
- fprintf(stderr,"Quote: %d\n",YY_START);
+ //fprintf(stderr,"Quote: %d\n",YY_START);
}
<*>. {
@@ -1626,7 +1630,7 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief
}
int position = 0;
- bool needsEntry;
+ bool needsEntry = false;
int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
Markdown markdown(yyextra->yyFileName,lineNr);
QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc,lineNr) : doc;
@@ -1711,7 +1715,7 @@ static void initSpecialBlock(yyscan_t yyscanner)
yyextra->docBrief = TRUE;
yyextra->docBlock.resize(0);
yyextra->commentIndent = yyextra->curIndent;
- startCommentBlock(yyscanner,TRUE);
+ startCommentBlock(yyscanner,FALSE);
}
static void searchFoundDef(yyscan_t yyscanner)
@@ -1757,8 +1761,8 @@ static void parseCompounds(yyscan_t yyscanner,std::shared_ptr<Entry> rt)
std::shared_ptr<Entry> ce = rt->children()[i];
if (!ce->program.isEmpty())
{
- //printf("-- %s ---------\n%s\n---------------\n",
- // ce->name.data(),ce->program.data());
+ //fprintf(stderr,"parseCompounds: -- %s (line %d) ---------\n%s\n---------------\n",
+ // ce->name.data(), ce->bodyLine, ce->program.data());
// init scanner state
yyextra->inputString = ce->program;
yyextra->inputPosition = 0;