* Append a character to the current formatted line. * The formattedLine split points are updated. * * @param char the character to append. * @param canBreakLine if true, a registered line-break */
| 2303 | * @param canBreakLine if true, a registered line-break |
| 2304 | */ |
| 2305 | void ASFormatter::appendChar(char ch, bool canBreakLine) |
| 2306 | { |
| 2307 | if (canBreakLine && isInLineBreak) |
| 2308 | breakLine(); |
| 2309 | |
| 2310 | formattedLine.append(1, ch); |
| 2311 | isImmediatelyPostCommentOnly = false; |
| 2312 | if (maxCodeLength != string::npos) |
| 2313 | { |
| 2314 | // These compares reduce the frequency of function calls. |
| 2315 | if (isOkToSplitFormattedLine()) |
| 2316 | updateFormattedLineSplitPoints(ch); |
| 2317 | if (formattedLine.length() > maxCodeLength) |
| 2318 | testForTimeToSplitFormattedLine(); |
| 2319 | } |
| 2320 | } |
| 2321 | |
| 2322 | /** |
| 2323 | * Append a string sequence to the current formatted line. |
nothing calls this directly
no outgoing calls
no test coverage detected