diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2015-08-27 14:23:20 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2015-08-27 14:23:20 (GMT) |
commit | 8418d48172b29437ab36fa90691c87734d3ca27c (patch) | |
tree | 66d6d22321134265af6255b791d6a7646255517e | |
parent | 7fd7326ecd6f5d04e9a79eecef0c70219fa043f6 (diff) | |
parent | 6dacbd9b22bdd6cd1a8c3e9b5ec8c2f7d15977b8 (diff) | |
download | Doxygen-8418d48172b29437ab36fa90691c87734d3ca27c.zip Doxygen-8418d48172b29437ab36fa90691c87734d3ca27c.tar.gz Doxygen-8418d48172b29437ab36fa90691c87734d3ca27c.tar.bz2 |
Merge pull request #388 from albert-github/feature/bug_value_attribute
Add support for "value" attribute in FORTRAN scanner
-rw-r--r-- | src/fortranscanner.l | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/fortranscanner.l b/src/fortranscanner.l index cbe13fd..bd1fe83 100644 --- a/src/fortranscanner.l +++ b/src/fortranscanner.l @@ -100,13 +100,14 @@ struct SymbolModifiers { bool pass; bool contiguous; bool volat; /* volatile is a reserverd name */ + bool value; /* volatile is a reserverd name */ QCString passVar; SymbolModifiers() : type(), returnName(), protection(NONE_P), direction(NONE_D), optional(FALSE), protect(FALSE), dimension(), allocatable(FALSE), external(FALSE), intrinsic(FALSE), parameter(FALSE), pointer(FALSE), target(FALSE), save(FALSE), deferred(FALSE), nonoverridable(FALSE), - nopass(FALSE), pass(FALSE), contiguous(FALSE), volat(FALSE), passVar() {} + nopass(FALSE), pass(FALSE), contiguous(FALSE), volat(FALSE), value(FALSE), passVar() {} SymbolModifiers& operator|=(const SymbolModifiers &mdfs); SymbolModifiers& operator|=(QCString mdfrString); @@ -259,7 +260,7 @@ CHAR (CHARACTER{ARGS}?|CHARACTER{BS}"*"({BS}[0-9]+|{ARGS})) TYPE_SPEC (({NUM_TYPE}({BS}"*"{BS}[0-9]+)?)|({NUM_TYPE}{KIND})|DOUBLE{BS}COMPLEX|DOUBLE{BS}PRECISION|{CHAR}|TYPE{ARGS}|CLASS{ARGS}|PROCEDURE{ARGS}?) INTENT_SPEC intent{BS}"("{BS}(in|out|in{BS}out){BS}")" -ATTR_SPEC (EXTERNAL|ALLOCATABLE|DIMENSION{ARGS}|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PROTECTED|PRIVATE|PUBLIC|SAVE|TARGET|NOPASS|PASS{ARGS}?|DEFERRED|NON_OVERRIDABLE|CONTIGUOUS|VOLATILE) +ATTR_SPEC (EXTERNAL|ALLOCATABLE|DIMENSION{ARGS}|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PROTECTED|PRIVATE|PUBLIC|SAVE|TARGET|NOPASS|PASS{ARGS}?|DEFERRED|NON_OVERRIDABLE|CONTIGUOUS|VOLATILE|VALUE) ACCESS_SPEC (PRIVATE|PUBLIC) LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")" /* Assume that attribute statements are almost the same as attributes. */ @@ -1652,6 +1653,7 @@ SymbolModifiers& SymbolModifiers::operator|=(const SymbolModifiers &mdfs) passVar = mdfs.passVar; contiguous |= mdfs.contiguous; volat |= mdfs.volat; + value |= mdfs.value; return *this; } @@ -1738,6 +1740,10 @@ SymbolModifiers& SymbolModifiers::operator|=(QCString mdfString) { newMdf.volat = TRUE; } + else if (mdfString=="value") + { + newMdf.value = TRUE; + } else if (mdfString.contains("pass")) { newMdf.pass = TRUE; @@ -1902,6 +1908,11 @@ static QCString applyModifiers(QCString typeName, SymbolModifiers& mdfs) if (!typeName.isEmpty()) typeName += ", "; typeName += "volatile"; } + if (mdfs.value) + { + if (!typeName.isEmpty()) typeName += ", "; + typeName += "value"; + } return typeName; } |