[DEV] add parameter ';' add \n between action

This commit is contained in:
Edouard DUPIN 2018-01-02 22:35:28 +01:00
parent 42272a00e4
commit 067b211bf8
2 changed files with 5 additions and 1 deletions

View File

@ -238,6 +238,7 @@ estyle::Generator::Generator():
propertyIndentSize(this, "indent-size", 4, "default 4 sapce in one tabulation indentation"),
propertyDoxygenOneLine(this, "doxygen-1-line-type", true, "true: single line doxygen comment is done with '//!', false '///'"),
propertyDoxygenMultipleLine(this, "doxygen-N-line-type", DOXYGEN_MULTI_LINE__NORMAL, "0: /** */ ..."),
propertySemiColonReturnBetweenAction(this, "semi-colon-return-between-action", false, "true: 2 action separate with a ';' element have a newLine added"),
propertyForConditionMultiLineBigSize(this, "condition-for-multi-line-big-size", 80, "If the condition inside for (...;...;...) if bigger than XX char"),
propertyIfConditionMultiLineBigSize(this, "condition-if-multi-line-big-size", 80, "If the condition inside if (...&&...) if bigger than XX char"),
@ -314,7 +315,8 @@ void estyle::Generator::addNewLineIfSemiColon() {
if (m_output.size() == 0) {
return;
}
if (m_output.back() == ';') {
if ( m_output.back() == ';'
&& propertySemiColonReturnBetweenAction.get() == true) {
m_output += getEndOfLine();
}
}

View File

@ -64,6 +64,8 @@ namespace estyle {
eproperty::Value<bool> propertyDoxygenOneLine;
eproperty::List<int32_t> propertyDoxygenMultipleLine;
eproperty::Value<bool> propertySemiColonReturnBetweenAction;
eproperty::Value<int32_t> propertyForConditionMultiLineBigSize;
eproperty::Value<int32_t> propertyIfConditionMultiLineBigSize;
eproperty::Value<int32_t> propertyWhileConditionMultiLineBigSize;