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

Method formatLineCommentBody

astyle/src/ASFormatter.cpp:4878–4901  ·  view source on GitHub ↗

* format a line comment body * the calling function should have a continue statement after calling this method */

Source from the content-addressed store, hash-verified

4876 * the calling function should have a continue statement after calling this method
4877 */
4878void ASFormatter::formatLineCommentBody()
4879{
4880 assert(isInLineComment);
4881
4882 // append the comment
4883 while (charNum < (int) currentLine.length())
4884// && !isLineReady // commented out in release 2.04, unnecessary
4885 {
4886 currentChar = currentLine[charNum];
4887 if (currentChar == '\t' && shouldConvertTabs)
4888 convertTabToSpaces();
4889 appendCurrentChar();
4890 ++charNum;
4891 }
4892
4893 // explicitly break a line when a line comment's end is found.
4894 if (charNum == (int) currentLine.length())
4895 {
4896 isInLineBreak = true;
4897 isInLineComment = false;
4898 isImmediatelyPostLineComment = true;
4899 currentChar = 0; //make sure it is a neutral char.
4900 }
4901}
4902
4903/**
4904 * format a line comment opener

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected