diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2015-01-10 13:54:51 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2015-01-10 13:54:51 (GMT) |
commit | 081e3a9f921dc335422773526d53c8b99fb32147 (patch) | |
tree | 707d3eb48dd3cef4a0e187d788e37bf2d22ed728 | |
parent | 8de0cd2b5a73e25596aa7b229d30a9ca0d7fbffb (diff) | |
parent | 6a8bef8852eb22558b3559ebe96d9e06e6cadfa7 (diff) | |
download | Doxygen-081e3a9f921dc335422773526d53c8b99fb32147.zip Doxygen-081e3a9f921dc335422773526d53c8b99fb32147.tar.gz Doxygen-081e3a9f921dc335422773526d53c8b99fb32147.tar.bz2 |
Merge pull request #269 from rabindra-harlalka/odl_props_new
Fix parsing of ODL-style properties
-rw-r--r-- | src/scanner.l | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/src/scanner.l b/src/scanner.l index 821959c..01d1677 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -174,6 +174,7 @@ static char docBlockTerm; static QCString idlAttr; static QCString idlProp; +static bool odlProp; static bool g_lexInit = FALSE; static bool externC; @@ -3390,6 +3391,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 && @@ -3444,7 +3454,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; @@ -3471,6 +3488,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; @@ -3479,6 +3501,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(); |