summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorrabindra-harlalka <rabindra-harlalka@users.noreply.github.com>2014-12-21 17:21:33 (GMT)
committerrabindra-harlalka <rabindra-harlalka@users.noreply.github.com>2014-12-21 17:21:33 (GMT)
commit6a8bef8852eb22558b3559ebe96d9e06e6cadfa7 (patch)
treef99ba16f0f17ebca90777af03cbd2d184922484c /src
parentac28c931c2c589476bd00ad8286408eaf20efa18 (diff)
downloadDoxygen-6a8bef8852eb22558b3559ebe96d9e06e6cadfa7.zip
Doxygen-6a8bef8852eb22558b3559ebe96d9e06e6cadfa7.tar.gz
Doxygen-6a8bef8852eb22558b3559ebe96d9e06e6cadfa7.tar.bz2
Fix parsing of ODL-style properties
Declaration of properties inside a dispinterface (ODL syntax) in IDL/ODL file is not parsed properly. Fix that.
Diffstat (limited to 'src')
-rw-r--r--src/scanner.l40
1 files changed, 39 insertions, 1 deletions
diff --git a/src/scanner.l b/src/scanner.l
index d012b93..0e0bb30 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -182,6 +182,7 @@ static char docBlockTerm;
static QCString idlAttr;
static QCString idlProp;
+static bool odlProp;
static bool g_lexInit = FALSE;
static bool externC;
@@ -3398,6 +3399,15 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
idlAttr.resize(0);
idlProp.resize(0);
current->mtype = mtype;
+
+ if (Config_getBool("IDL_PROPERTY_SUPPORT") &&
+ current->mtype == Property)
+ { // we are inside the properties section of a dispinterface
+ odlProp = true;
+ current->spec |= Entry::Gettable;
+ current->spec |= Entry::Settable;
+ }
+
BEGIN( IDLAttribute );
}
else if (insideCS &&
@@ -3452,7 +3462,14 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
current->spec |= Entry::Optional;
}
<IDLAttribute>"readonly" { // on UNO IDL attribute or property
- current->spec |= Entry::Readonly;
+ if (Config_getBool("IDL_PROPERTY_SUPPORT") && odlProp)
+ {
+ current->spec ^= Entry::Settable;
+ }
+ else
+ {
+ current->spec |= Entry::Readonly;
+ }
}
<IDLAttribute>"bound" { // on UNO IDL attribute or property
current->spec |= Entry::Bound;
@@ -3479,6 +3496,11 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
<IDLPropName>{BN}*{ID}{BN}* {
// return type (probably HRESULT) - skip it
+
+ if (odlProp)
+ { // property type
+ idlProp = yytext;
+ }
}
<IDLPropName>{ID}{BN}*"(" {
current->name = yytext;
@@ -3487,6 +3509,22 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
current->startColumn = yyColNr;
BEGIN( IDLProp );
}
+<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* {
+ if (odlProp)
+ {
+ idlProp += yytext;
+ }
+ }
+<IDLPropName>{ID}{BN}*/";" {
+ if (odlProp)
+ {
+ current->name = yytext;
+ idlProp = idlProp.stripWhiteSpace();
+ odlProp = false;
+
+ BEGIN( IDLProp );
+ }
+ }
<IDLProp>{BN}*"["[^\]]*"]"{BN}* { // attribute of a parameter
idlAttr = yytext;
idlAttr=idlAttr.stripWhiteSpace();