MCPcopy Create free account
hub / github.com/dirkvranckaert/AndroidDecompiler / isNonInStatementArrayBracket

Method isNonInStatementArrayBracket

astyle/src/ASFormatter.cpp:2886–2906  ·  view source on GitHub ↗

* check if an array bracket should NOT have an in-statement indent * * @return the array is non in-statement */

Source from the content-addressed store, hash-verified

2884 * @return the array is non in-statement
2885 */
2886bool 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,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected