From 8a2b1dd98f6d1dd2ed08beda3a654827a0ad821b Mon Sep 17 00:00:00 2001 From: Austin Henriksen Date: Wed, 12 Jun 2019 10:52:16 -0400 Subject: Fixes #6860. --- src/scanner.l | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/scanner.l b/src/scanner.l index e36b36d..42058d8 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -78,6 +78,7 @@ static int lastHereDocContext; static int lastDefineContext; static int lastAlignAsContext; static int lastC11AttributeContext; +static int lastModifierContext; static Protection protection; static Protection baseProt; static int sharpCount = 0 ; @@ -766,6 +767,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) /** Slice states */ +%x SliceOptional %x SliceMetadata %x SliceSequence %x SliceSequenceName @@ -2439,6 +2441,19 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) current->type+=yytext; BEGIN(DeclType); } + else if (insideSlice && qstrcmp(yytext,"optional")==0) + { + if (current->type.isEmpty()) + { + current->type = "optional"; + } + else + { + current->type += " optional"; + } + lastModifierContext = YY_START; + BEGIN(SliceOptional); + } else { if (YY_START==FindMembers) @@ -3593,6 +3608,20 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) BEGIN (lastSquareContext); } } +"(" { + current->type += "("; + roundCount++; + } +[0-9]+ { + current->type += yytext; + } +")" { + current->type += ")"; + if(--roundCount<=0) + { + BEGIN (lastModifierContext); + } + } "]" { // end of IDL function attribute if (--squareCount<=0) -- cgit v0.12 From 3a9964f4e096a030a2aac0a4a3688ba996715a27 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 15 Jun 2019 11:47:51 +0200 Subject: Cygwin should by default also have `CASE_SENS_NAMES=NO` Cygwin should by default also have `CASE_SENS_NAMES=NO` like is the case for the underlying Windows. In case of Cygwin the define `_WIN32` is not set so we also have to test for `__CYGWIN__` --- src/config.xml | 4 ++-- src/portable.cpp | 2 +- src/util.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/config.xml b/src/config.xml index 0bf34a8..f3b16a8 100644 --- a/src/config.xml +++ b/src/config.xml @@ -960,8 +960,8 @@ Go to the next section or return to the will only generate file names in lower-case letters. If set to \c YES, upper-case letters are also allowed. This is useful if you have classes or files whose names only differ in case and if your file system - supports case sensitive file names. Windows and Mac users are advised to set this - option to \c NO. + supports case sensitive file names. Windows (including Cygwin) ands + Mac users are advised to set this option to \c NO. ]]> diff --git a/src/portable.cpp b/src/portable.cpp index 3dccaed..6ee9927 100644 --- a/src/portable.cpp +++ b/src/portable.cpp @@ -396,7 +396,7 @@ const char *portable_commandExtension() bool portable_fileSystemIsCaseSensitive() { -#if defined(_WIN32) || defined(macintosh) || defined(__MACOSX__) || defined(__APPLE__) +#if defined(_WIN32) || defined(macintosh) || defined(__MACOSX__) || defined(__APPLE__) || defined(__CYGWIN__) return FALSE; #else return TRUE; diff --git a/src/util.cpp b/src/util.cpp index a6ae004..338b10c 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -5129,7 +5129,7 @@ FileDef *findFileDef(const FileNameDict *fnDict,const char *n,bool &ambig) if (fn->count()==1) { FileDef *fd = fn->getFirst(); -#if defined(_WIN32) || defined(__MACOSX__) // Windows or MacOSX +#if defined(_WIN32) || defined(__MACOSX__) || defined(__CYGWIN__) // Windows or MacOSX bool isSamePath = fd->getPath().right(path.length()).lower()==path.lower(); #else // Unix bool isSamePath = fd->getPath().right(path.length())==path; @@ -8138,7 +8138,7 @@ bool patternMatch(const QFileInfo &fi,const QStrList *patList) bool found = FALSE; // For Windows/Mac, always do the case insensitive match -#if defined(_WIN32) || defined(__MACOSX__) +#if defined(_WIN32) || defined(__MACOSX__) || defined(__CYGWIN__) caseSenseNames = FALSE; #endif -- cgit v0.12 From b0a820504b0c946d53dac75f0c69593f7c7c5fa5 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 15 Jun 2019 14:46:11 +0200 Subject: Remove compilation warnings from doxmlparser Remove some warnings about incomplete types like: ``` D:\Programs\Doxygen\fork\doxygen\qtools\qlist.h(109) : warning C4150: deletion of pointer to incomplete type 'ParamHandler'; no destructor called d:\programs\doxygen\fork\doxygen\addon\doxmlparser\src\memberhandler.h(31) : see declaration of 'ParamHandler' D:\Programs\Doxygen\fork\doxygen\qtools\qlist.h(109) : while compiling class template member function 'void QList::deleteValue(type *) const' with [ type=ParamHandler ] d:\programs\doxygen\fork\doxygen\addon\doxmlparser\src\memberhandler.h(189) : see reference to class template instantiation 'QList' being compiled ``` from doxmlparser --- addon/doxmlparser/src/compoundhandler.cpp | 1 + addon/doxmlparser/src/loamhandler.cpp | 2 ++ addon/doxmlparser/src/mainhandler.cpp | 2 ++ addon/doxmlparser/src/sectionhandler.cpp | 2 ++ 4 files changed, 7 insertions(+) diff --git a/addon/doxmlparser/src/compoundhandler.cpp b/addon/doxmlparser/src/compoundhandler.cpp index 3e729e9..0f51792 100644 --- a/addon/doxmlparser/src/compoundhandler.cpp +++ b/addon/doxmlparser/src/compoundhandler.cpp @@ -22,6 +22,7 @@ #include "paramhandler.h" #include "loamhandler.h" #include "memberhandler.h" +#include "linkedtexthandler.h" //---------------------------------------------------------------------------- diff --git a/addon/doxmlparser/src/loamhandler.cpp b/addon/doxmlparser/src/loamhandler.cpp index a939b7b..52aa576 100644 --- a/addon/doxmlparser/src/loamhandler.cpp +++ b/addon/doxmlparser/src/loamhandler.cpp @@ -1,5 +1,7 @@ #include "loamhandler.h" #include "memberhandler.h" +#include "linkedtexthandler.h" +#include "paramhandler.h" ListOfAllMembersHandler::ListOfAllMembersHandler(IBaseHandler *parent) : m_parent(parent) diff --git a/addon/doxmlparser/src/mainhandler.cpp b/addon/doxmlparser/src/mainhandler.cpp index 93525f0..ac56229 100644 --- a/addon/doxmlparser/src/mainhandler.cpp +++ b/addon/doxmlparser/src/mainhandler.cpp @@ -20,6 +20,8 @@ #include "graphhandler.h" #include "dochandler.h" #include "memberhandler.h" +#include "linkedtexthandler.h" +#include "paramhandler.h" #include "debug.h" diff --git a/addon/doxmlparser/src/sectionhandler.cpp b/addon/doxmlparser/src/sectionhandler.cpp index 1137901..075cc73 100644 --- a/addon/doxmlparser/src/sectionhandler.cpp +++ b/addon/doxmlparser/src/sectionhandler.cpp @@ -17,6 +17,8 @@ #include "compoundhandler.h" #include "sectionhandler.h" #include "memberhandler.h" +#include "linkedtexthandler.h" +#include "paramhandler.h" #include "dochandler.h" #include "debug.h" -- cgit v0.12