summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pycode.l7
-rw-r--r--src/pyscanner.l4
2 files changed, 11 insertions, 0 deletions
diff --git a/src/pycode.l b/src/pycode.l
index ea314da..cc00447 100644
--- a/src/pycode.l
+++ b/src/pycode.l
@@ -168,6 +168,8 @@ EXPCHAR [#(){}\[\],:.%/\\=`*~|&<>!;+-]
NONEMPTYEXP [^ \t\n:]
PARAMNONEMPTY [^ \t\n():]
IDENTIFIER ({LETTER}|"_")({LETTER}|{DIGIT}|"_")*
+SCOPE {IDENTIFIER}("."{IDENTIFIER})*
+CALLANY "("[^)]*")"
BORDER ([^A-Za-z0-9])
POUNDCOMMENT "##"
@@ -341,6 +343,11 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBU
codify(yyscanner,"cls.");
findMemberLink(yyscanner,*yyextra->code,&yytext[4]);
}
+ "@"{SCOPE}{CALLANY}? { // decorator
+ startFontClass(yyscanner,"preprocessor");
+ codify(yyscanner,yytext);
+ endFontClass(yyscanner);
+ }
}
<ClassDec>{IDENTIFIER} {
diff --git a/src/pyscanner.l b/src/pyscanner.l
index a136b52..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;
}