Skip to content

Commit 0f816cd

Browse files
committed
refactor read from config, FIX #161
1 parent 03527f1 commit 0f816cd

File tree

5 files changed

+154
-104
lines changed

5 files changed

+154
-104
lines changed

CodeFormatCore/include/CodeFormatCore/Config/LuaStyle.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ class LuaStyle {
7777

7878
bool ignore_spaces_inside_function_call = false;
7979

80-
SpaceBeforeInlineComment space_before_inline_comment = SpaceBeforeInlineComment();
80+
SpaceBeforeInlineComment space_before_inline_comment;
8181

8282
// [operator space]
83-
bool space_around_math_operator = true;
83+
SpaceAroundMath space_around_math_operator;
8484

8585
bool space_after_comma = true;
8686

CodeFormatCore/include/CodeFormatCore/Config/LuaStyleStruct.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,14 @@ struct SpaceBeforeSingleArg {
2020
table = value;
2121
string = value;
2222
}
23+
};
24+
25+
struct SpaceAroundMath {
26+
bool exponent = true;
27+
bool other = true;
28+
29+
void SetAll(bool value) {
30+
exponent = value;
31+
other = value;
32+
}
2333
};

0 commit comments

Comments
 (0)