Skip to content

Commit 1373f81

Browse files
Clean up unused methods
1 parent 8dbebcc commit 1373f81

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

CodeFormatCore/include/CodeFormatCore/Format/Analyzer/SemicolonAnalyzer.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@ class SemicolonAnalyzer : public FormatAnalyzer {
1717

1818
private:
1919
void AddSemicolon(LuaSyntaxNode n, const LuaSyntaxTree &t);
20-
void InsertNewLineBeforeNode(LuaSyntaxNode n, const LuaSyntaxTree &t);
2120
void InsertNewLineBeforeNextNode(LuaSyntaxNode n, const LuaSyntaxTree& t);
2221
void RemoveSemicolon(LuaSyntaxNode n, const LuaSyntaxTree &t);
23-
bool IsFirstStmtOfLine(LuaSyntaxNode n, const LuaSyntaxTree &t);
2422
bool IsLastStmtOfLine(LuaSyntaxNode n, const LuaSyntaxTree &t);
2523
bool EndsWithSemicolon(LuaSyntaxNode n, const LuaSyntaxTree &t);
2624
bool ContainsSemicolon(LuaSyntaxNode n, const LuaSyntaxTree& t);

CodeFormatCore/src/Format/Analyzer/SemicolonAnalyzer.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,6 @@ void SemicolonAnalyzer::AddSemicolon(LuaSyntaxNode n, const LuaSyntaxTree &t) {
8383
}
8484
}
8585

86-
void SemicolonAnalyzer::InsertNewLineBeforeNode(LuaSyntaxNode n, const LuaSyntaxTree &t) {
87-
auto token = n.GetFirstToken(t); // line breaks are put in front of the statement itself by non-first statements
88-
if (token.IsToken(t)) {
89-
_semicolon[token.GetIndex()] = SemicolonStrategy::InsertNewLine;
90-
}
91-
}
92-
9386
void SemicolonAnalyzer::InsertNewLineBeforeNextNode(LuaSyntaxNode n, const LuaSyntaxTree& t) {
9487
auto token = n.GetNextTokenSkipComment(t);
9588
if (token.IsToken(t) && token.GetStartLine(t) == n.GetEndLine(t)) {
@@ -104,7 +97,6 @@ void SemicolonAnalyzer::RemoveSemicolon(LuaSyntaxNode n, const LuaSyntaxTree &t)
10497
}
10598
}
10699

107-
108100
bool SemicolonAnalyzer::IsLastStmtOfLine(LuaSyntaxNode n, const LuaSyntaxTree &t) {
109101
// check if next stmt starts on same line as the current one ends
110102
auto currentEnd = n.GetEndLine(t);

0 commit comments

Comments
 (0)