diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/fortrancode.l | 14 | ||||
-rw-r--r-- | src/fortranscanner.l | 32 |
2 files changed, 28 insertions, 18 deletions
diff --git a/src/fortrancode.l b/src/fortrancode.l index e9fefea..d7385ff 100644 --- a/src/fortrancode.l +++ b/src/fortrancode.l @@ -770,10 +770,13 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA BEGIN(UseOnly); } <UseOnly>{BS},{BS} { codifyLines(yytext); } +<UseOnly>{BS}&{BS}"\n" { codifyLines(yytext); } <UseOnly>{ID} { - codifyLines(yytext); + g_insideBody=TRUE; + generateLink(*g_code, yytext); + g_insideBody=FALSE; useEntry->onlyNames.append(yytext); - } + } <Use,UseOnly>"\n" { unput(*yytext); yy_pop_state(); @@ -1015,6 +1018,13 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA <*>"\\\\" { str+=yytext; /* ignore \\ */} <*>"\\\""|\\\' { str+=yytext; /* ignore \" */} +<String>\n { // string with \n inside + str+=yytext; + startFontClass("stringliteral"); + codifyLines(str); + endFontClass(); + str = ""; + } <String>\"|\' { // string ends with next quote without previous backspace if(yytext[0]!=stringStartSymbol) REJECT; // single vs double quote str+=yytext; diff --git a/src/fortranscanner.l b/src/fortranscanner.l index 69f6143..884d3bf 100644 --- a/src/fortranscanner.l +++ b/src/fortranscanner.l @@ -1638,84 +1638,84 @@ static QCString applyModifiers(QCString typeName, SymbolModifiers& mdfs) { if (!mdfs.dimension.isNull()) { - typeName += ", "; + if (!typeName.isEmpty()) typeName += ", "; typeName += mdfs.dimension; } if (mdfs.direction!=SymbolModifiers::NONE_D) { - typeName += ", "; + if (!typeName.isEmpty()) typeName += ", "; typeName += directionStrs[mdfs.direction]; } if (mdfs.optional) { - typeName += ", "; + if (!typeName.isEmpty()) typeName += ", "; typeName += "optional"; } if (mdfs.allocatable) { - typeName += ", "; + if (!typeName.isEmpty()) typeName += ", "; typeName += "allocatable"; } if (mdfs.external) { - typeName += ", "; + if (!typeName.isEmpty()) typeName += ", "; typeName += "external"; } if (mdfs.intrinsic) { - typeName += ", "; + if (!typeName.isEmpty()) typeName += ", "; typeName += "intrinsic"; } if (mdfs.parameter) { - typeName += ", "; + if (!typeName.isEmpty()) typeName += ", "; typeName += "parameter"; } if (mdfs.pointer) { - typeName += ", "; + if (!typeName.isEmpty()) typeName += ", "; typeName += "pointer"; } if (mdfs.target) { - typeName += ", "; + if (!typeName.isEmpty()) typeName += ", "; typeName += "target"; } if (mdfs.save) { - typeName += ", "; + if (!typeName.isEmpty()) typeName += ", "; typeName += "save"; } if (mdfs.deferred) { - typeName += ", "; + if (!typeName.isEmpty()) typeName += ", "; typeName += "deferred"; } if (mdfs.nonoverridable) { - typeName += ", "; + if (!typeName.isEmpty()) typeName += ", "; typeName += "non_overridable"; } if (mdfs.nopass) { - typeName += ", "; + if (!typeName.isEmpty()) typeName += ", "; typeName += "nopass"; } if (mdfs.pass) { - typeName += ", "; + if (!typeName.isEmpty()) typeName += ", "; typeName += "pass"; if (!mdfs.passVar.isEmpty()) typeName += "(" + mdfs.passVar + ")"; } if (mdfs.protection == SymbolModifiers::PUBLIC) { - typeName += ", "; + if (!typeName.isEmpty()) typeName += ", "; typeName += "public"; } else if (mdfs.protection == SymbolModifiers::PRIVATE) { - typeName += ", "; + if (!typeName.isEmpty()) typeName += ", "; typeName += "private"; } |