261102.2 · f6f7732e86d14c852739b964f23db7ed3fff82c3
updated astyle version to 3.6.21
reading declarations
Changes to src/include/astyle/. All files
@@ -29,7 +29,7 @@ #include <cstring> // need both string and cstring for GCC #endif -#define ASTYLE_VERSION "3.6.20"+#define ASTYLE_VERSION "3.6.21" namespace astyle {@@ -506,6 +506,7 @@ private: // functions [[nodiscard]] bool isDeclarationContinuationLine(std::string_view line) const; [[nodiscard]] bool isUsingBeforeFirstCase(std::string_view line) const; [[nodiscard]] bool statementEndsWithComma(std::string_view line, int index) const;+ [[nodiscard]] bool isDesignatedInitializer(std::string_view line, size_t index) const; [[nodiscard]] std::string getIndentedSpaceEquivalent(std::string_view line_) const; void popLambda();@@ -555,7 +556,7 @@ private: // variables }; std::unique_ptr<std::vector<ParenBlockState>> parenBlockStateStack; // aligned with parenDepthStack std::unique_ptr<std::vector<bool>> blockConditionalStack;- std::unique_ptr<std::vector<bool>> blockQuestionStack; // isInQuestion at a block brace, e.g. a lambda in a ?: sequence+ std::unique_ptr<std::vector<int>> blockQuestionStack; // questionMarkCount at a block brace, e.g. a lambda in a ?: sequence std::unique_ptr<std::vector<bool>> parenStatementStack; std::unique_ptr<std::vector<bool>> braceBlockStateStack; std::unique_ptr<std::vector<bool>> lambdaBodyStateStack; // aligned with braceBlockStateStack, true for a lambda body@@ -585,7 +586,7 @@ private: // variables bool isInPreprocessorComment; bool isInRunInComment; bool isInCase;- bool isInQuestion;+ int questionMarkCount; // '?' not yet matched by the ':' of a ?: sequence bool isContinuation; bool isInHeader; bool isInTemplate;@@ -607,6 +608,7 @@ private: // variables bool isInEnum; bool isInEnumTypeID; bool isInStruct;+ bool isInDesignatedInit; // continuation indent registered by '.member = value' in a brace array bool isInLet; bool isInTrailingReturnType; bool isInConstevalCondition;@@ -784,6 +786,7 @@ public: // functions void extracted(); std::string nextLine(); LineEndFormat getLineEndFormat() const;+ bool getEOFNewlineMode() const; bool getIsLineReady() const; void setFormattingStyle(FormatStyle style); void setAddBracesMode(bool state);@@ -822,6 +825,7 @@ public: // functions void setAttachReturnTypeDecl(bool state); void setIndentCol1CommentsMode(bool state); void setLineEndFormat(LineEndFormat fmt);+ void setEOFNewlineMode(bool state); void setMaxCodeLength(int max); void setMaxCodeLengthMode(MaxCodeLengthMode mode); void setIgnoreSideCommentLengths(bool state);@@ -871,6 +875,7 @@ private: // functions bool computeChecksumIn(std::string_view currentLine_); bool computeChecksumOut(std::string_view beautifiedLine); bool addBracesToStatement();+ bool isMultiLineStatementEndFound() const; bool removeBracesFromStatement(); bool commentAndHeaderFollows(); bool getNextChar();@@ -932,6 +937,7 @@ private: // functions void clearFormattedLineSplitPoints(); void convertTabToSpaces(); void findReturnTypeSplitPoint(const std::string& firstLine);+ bool isOnlyFunctionSpecifiers(const std::string& line, size_t start, size_t end) const; void formatArrayRunIn(); void formatRunIn(); void formatArrayBraces(BraceType braceType, bool isOpeningArrayBrace);@@ -1039,6 +1045,7 @@ private: // variables int templateDepth; int squareBracketCount; int parenthesesCount;+ int addedBraceStatementParenDepth; size_t squeezeEmptyLineNum; size_t squeezeEmptyLineCount;@@ -1094,6 +1101,7 @@ private: // variables bool shouldUnPadParens; bool shouldConvertTabs; bool shouldIndentCol1Comments;+ bool shouldEndWithSingleNewline; bool shouldIndentPreprocBlock; bool shouldCloseTemplates; bool shouldAttachExternC;@@ -1174,6 +1182,7 @@ private: // variables bool isInObjCSelector; bool breakCurrentOneLineBlock; bool shouldRemoveNextClosingBrace;+ bool shouldAddClosingBraceAtStatementEnd; bool isInBraceRunIn; bool returnTypeChecked; bool currentLineBeginsWithBrace;@@ -1237,6 +1246,7 @@ private: // variables bool prependEmptyLine; bool isPreviousReadyLinePreprocCondStart; bool appendOpeningBrace;+ bool appendClosingBrace; bool foundClosingHeader; bool isInHeader; bool isImmediatelyPostHeader;