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

Method isInExponent

astyle/src/ASFormatter.cpp:2864–2879  ·  view source on GitHub ↗

* check if the currently reached '+' or '-' character is * part of an exponent, i.e. 0.2E-5. * * @return whether the current '+' or '-' is in an exponent. */

Source from the content-addressed store, hash-verified

2862 * @return whether the current '+' or '-' is in an exponent.
2863 */
2864bool ASFormatter::isInExponent() const
2865{
2866 assert(currentChar == '+' || currentChar == '-');
2867
2868 int formattedLineLength = formattedLine.length();
2869 if (formattedLineLength >= 2)
2870 {
2871 char prevPrevFormattedChar = formattedLine[formattedLineLength - 2];
2872 char prevFormattedChar = formattedLine[formattedLineLength - 1];
2873
2874 return ((prevFormattedChar == 'e' || prevFormattedChar == 'E')
2875 && (prevPrevFormattedChar == '.' || isDigit(prevPrevFormattedChar)));
2876 }
2877 else
2878 return false;
2879}
2880
2881/**
2882 * check if an array bracket should NOT have an in-statement indent

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected