summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Hansen <hansec@uw.edu>2014-05-05 20:23:17 (GMT)
committerChris Hansen <hansec@uw.edu>2014-05-05 20:23:17 (GMT)
commit558697792cd062b93e8d7b7904fb9897e5f70750 (patch)
tree1c9a395ca90737921526c07e6e99aee5b6f8eeca
parente9b40bf029d8315467a69c3a97b83624293cd5b6 (diff)
downloadDoxygen-558697792cd062b93e8d7b7904fb9897e5f70750.zip
Doxygen-558697792cd062b93e8d7b7904fb9897e5f70750.tar.gz
Doxygen-558697792cd062b93e8d7b7904fb9897e5f70750.tar.bz2
Added import keyword to FORTRAN code highlighting
-rw-r--r--src/fortrancode.l22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/fortrancode.l b/src/fortrancode.l
index 2fbde73..06f712a 100644
--- a/src/fortrancode.l
+++ b/src/fortrancode.l
@@ -716,6 +716,7 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
%x DocBlock
%x Use
%x UseOnly
+%x Import
%x TypeDecl
%x Declaration
%x DeclContLine
@@ -791,19 +792,32 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
yy_push_state(YY_START);
BEGIN(UseOnly);
}
-<UseOnly>{BS},{BS} { codifyLines(yytext); }
-<UseOnly>{BS}&{BS}"\n" { codifyLines(yytext); YY_FTN_RESET}
+<UseOnly,Import>{BS},{BS} { codifyLines(yytext); }
+<UseOnly,Import>{BS}&{BS}"\n" { codifyLines(yytext); YY_FTN_RESET}
<UseOnly>{ID} {
g_insideBody=TRUE;
generateLink(*g_code, yytext);
g_insideBody=FALSE;
useEntry->onlyNames.append(yytext);
}
-<Use,UseOnly>"\n" {
+<Use,UseOnly,Import>"\n" {
unput(*yytext);
yy_pop_state();YY_FTN_RESET
}
-
+<Start>"import"{BS_} {
+ startFontClass("keywordflow");
+ codifyLines(yytext);
+ endFontClass();
+ yy_push_state(YY_START);
+ BEGIN(Import);
+ }
+<Import>{ID} {
+ QCString tmp = yytext;
+ tmp = tmp.lower();
+ g_insideBody=TRUE;
+ generateLink(*g_code, yytext);
+ g_insideBody=FALSE;
+ }
/*-------- fortran module -----------------------------------------*/
<Start>("block"{BS}"data"|"program"|"module"|"type"|"interface")/{BS_}|({COMMA}{ACCESS_SPEC})|\n { //
startScope();