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

Method isOkToSplitFormattedLine

astyle/src/ASFormatter.cpp:6073–6102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6071}
6072
6073bool ASFormatter::isOkToSplitFormattedLine()
6074{
6075 assert(maxCodeLength != string::npos);
6076 // Is it OK to split the line?
6077 if (shouldKeepLineUnbroken
6078 || isInLineComment
6079 || isInComment
6080 || isInQuote
6081 || isInCase
6082 || isInPreprocessor
6083 || isInExecSQL
6084 || isInAsm || isInAsmOneLine || isInAsmBlock
6085 || isInTemplate)
6086 return false;
6087
6088 if (!isOkToBreakBlock(bracketTypeStack->back()) && currentChar != '{')
6089 {
6090 shouldKeepLineUnbroken = true;
6091 clearFormattedLineSplitPoints();
6092 return false;
6093 }
6094 else if (isBracketType(bracketTypeStack->back(), ARRAY_TYPE))
6095 {
6096 shouldKeepLineUnbroken = true;
6097 if (!isBracketType(bracketTypeStack->back(), ARRAY_NIS_TYPE))
6098 clearFormattedLineSplitPoints();
6099 return false;
6100 }
6101 return true;
6102}
6103
6104/* This is called if the option maxCodeLength is set.
6105 */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected