This repository was archived by the owner on Aug 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3171,6 +3171,22 @@ r2_fix_indent_for_subquery_in_paren:
31713171 }
31723172}
31733173
3174+ r2_fix_indent_for_case_expr:
3175+ ([parent) case_expr | [parent) case_expression)
3176+ & [endcase) 'END'
3177+ & endcase^ = parent
3178+ -> {
3179+ var parent = tuple.get("parent");
3180+ if (getIndent(parent.from).indexOf("\n") == -1) {
3181+ var endcase = tuple.get("endcase");
3182+ var marginDiff = getColumn(parent.from) - getColumn(endcase.from);
3183+ if (marginDiff > 0) {
3184+ addIndent(parent, marginDiff);
3185+ logger.fine(struct.getClass(), "r2_fix_indent_for_case_expr: at " + parent.from + ".");
3186+ }
3187+ }
3188+ }
3189+
31743190-- --------------------------------------------------------------------------------------------------------------------
31753191-- R7: SQL keywords are right aligned within a SQL command.
31763192-- --------------------------------------------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments