* format a quote opener * the quote opener will be appended to the current formattedLine or a new formattedLine as necessary * the calling function should have a continue statement after calling this method */
| 5088 | * the calling function should have a continue statement after calling this method |
| 5089 | */ |
| 5090 | void ASFormatter::formatQuoteOpener() |
| 5091 | { |
| 5092 | assert(currentChar == '"' || currentChar == '\''); |
| 5093 | |
| 5094 | isInQuote = true; |
| 5095 | quoteChar = currentChar; |
| 5096 | if (isSharpStyle() && previousChar == '@') |
| 5097 | isInVerbatimQuote = true; |
| 5098 | |
| 5099 | // a quote following a bracket is an array |
| 5100 | if (previousCommandChar == '{' |
| 5101 | && !isImmediatelyPostComment |
| 5102 | && !isImmediatelyPostLineComment |
| 5103 | && isNonInStatementArray |
| 5104 | && !isBracketType(bracketTypeStack->back(), SINGLE_LINE_TYPE) |
| 5105 | && !isWhiteSpace(peekNextChar())) |
| 5106 | { |
| 5107 | if (bracketFormatMode == NONE_MODE) |
| 5108 | { |
| 5109 | if (currentLineBeginsWithBracket) |
| 5110 | formatRunIn(); |
| 5111 | } |
| 5112 | else if (bracketFormatMode == RUN_IN_MODE) |
| 5113 | { |
| 5114 | formatRunIn(); |
| 5115 | } |
| 5116 | else if (bracketFormatMode == BREAK_MODE) |
| 5117 | { |
| 5118 | if (formattedLine.length() > 0 && formattedLine[0] == '{') |
| 5119 | isInLineBreak = true; |
| 5120 | } |
| 5121 | else |
| 5122 | { |
| 5123 | if (currentLineBeginsWithBracket) |
| 5124 | isInLineBreak = true; |
| 5125 | } |
| 5126 | } |
| 5127 | previousCommandChar = ' '; |
| 5128 | appendCurrentChar(); |
| 5129 | } |
| 5130 | |
| 5131 | /** |
| 5132 | * get the next line comment adjustment that results from breaking a closing bracket. |
nothing calls this directly
no outgoing calls
no test coverage detected