* check if an array bracket should NOT have an in-statement indent * * @return the array is non in-statement */
| 2884 | * @return the array is non in-statement |
| 2885 | */ |
| 2886 | bool ASFormatter::isNonInStatementArrayBracket() const |
| 2887 | { |
| 2888 | bool returnVal = false; |
| 2889 | char nextChar = peekNextChar(); |
| 2890 | // if this opening bracket begins the line there will be no inStatement indent |
| 2891 | if (currentLineBeginsWithBracket |
| 2892 | && charNum == (int) currentLineFirstBracketNum |
| 2893 | && nextChar != '}') |
| 2894 | returnVal = true; |
| 2895 | // if an opening bracket ends the line there will be no inStatement indent |
| 2896 | if (isWhiteSpace(nextChar) |
| 2897 | || isBeforeAnyLineEndComment(charNum) |
| 2898 | || nextChar == '{') |
| 2899 | returnVal = true; |
| 2900 | |
| 2901 | // Java "new Type [] {...}" IS an inStatement indent |
| 2902 | if (isJavaStyle() && previousNonWSChar == ']') |
| 2903 | returnVal = false; |
| 2904 | |
| 2905 | return returnVal; |
| 2906 | } |
| 2907 | |
| 2908 | /** |
| 2909 | * check if a one-line bracket has been reached, |
nothing calls this directly
no outgoing calls
no test coverage detected