* check if current comment is a line-end comment * * @return is before a line-end comment. */
| 1565 | * @return is before a line-end comment. |
| 1566 | */ |
| 1567 | bool ASBeautifier::isLineEndComment(const string &line, int startPos) const |
| 1568 | { |
| 1569 | assert(line.compare(startPos, 2, "/*") == 0); |
| 1570 | |
| 1571 | // comment must be closed on this line with nothing after it |
| 1572 | size_t endNum = line.find("*/", startPos + 2); |
| 1573 | if (endNum != string::npos) |
| 1574 | { |
| 1575 | size_t nextChar = line.find_first_not_of(" \t", endNum + 2); |
| 1576 | if (nextChar == string::npos) |
| 1577 | return true; |
| 1578 | } |
| 1579 | return false; |
| 1580 | } |
| 1581 | |
| 1582 | /** |
| 1583 | * get the previous word index for an assignment operator |
nothing calls this directly
no outgoing calls
no test coverage detected