Skip to content

Commit

Permalink
fix spacing after switch keyword formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
m0rkeulv committed Feb 6, 2024
1 parent dd45856 commit d2950b3
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,6 @@ else if (elementType == WHILE_STATEMENT || elementType == DO_WHILE_STATEMENT) {
else if (elementType == FOR_STATEMENT) {
return addSingleSpaceIf(mySettings.SPACE_BEFORE_FOR_PARENTHESES);
}
else if (elementType == SWITCH_STATEMENT) {
return addSingleSpaceIf(mySettings.SPACE_BEFORE_SWITCH_PARENTHESES);
}
else if (elementType == TRY_STATEMENT) {
return addSingleSpaceIf(mySettings.SPACE_BEFORE_TRY_PARENTHESES);
}
Expand All @@ -227,7 +224,11 @@ else if (elementType == CALL_EXPRESSION) {
return addSingleSpaceIf(mySettings.SPACE_BEFORE_METHOD_CALL_PARENTHESES);
}
}

if (elementType == SWITCH_STATEMENT) {
if (type2 == PARENTHESIZED_EXPRESSION) {
return addSingleSpaceIf(mySettings.SPACE_BEFORE_SWITCH_PARENTHESES);
}
}
if (type1 == OGREATER && type2 == OASSIGN) {
return addSingleSpaceIf(false);
}
Expand Down

0 comments on commit d2950b3

Please sign in to comment.