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

Method getNextChar

astyle/src/ASFormatter.cpp:2038–2068  ·  view source on GitHub ↗

* get the next character, increasing the current placement in the process. * the new character is inserted into the variable currentChar. * * @return whether succeeded to receive the new character. */

Source from the content-addressed store, hash-verified

2036 * @return whether succeeded to receive the new character.
2037 */
2038bool ASFormatter::getNextChar()
2039{
2040 isInLineBreak = false;
2041 previousChar = currentChar;
2042
2043 if (!isWhiteSpace(currentChar))
2044 {
2045 previousNonWSChar = currentChar;
2046 if (!isInComment && !isInLineComment && !isInQuote
2047 && !isImmediatelyPostComment
2048 && !isImmediatelyPostLineComment
2049 && !isInPreprocessor
2050 && !isSequenceReached("/*")
2051 && !isSequenceReached("//"))
2052 previousCommandChar = currentChar;
2053 }
2054
2055 if (charNum + 1 < (int) currentLine.length()
2056 && (!isWhiteSpace(peekNextChar()) || isInComment || isInLineComment))
2057 {
2058 currentChar = currentLine[++charNum];
2059
2060 if (currentChar == '\t' && shouldConvertTabs)
2061 convertTabToSpaces();
2062
2063 return true;
2064 }
2065
2066 // end of line has been reached
2067 return getNextLine();
2068}
2069
2070/**
2071 * get the next line of input, increasing the current placement in the process.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected