| 9987 | } |
| 9988 | |
| 9989 | void Add(int anchor, int end, char kind = '?', int minLines = 2) |
| 9990 | { |
| 9991 | if ((anchor == -1) || (end == -1)) |
| 9992 | return; |
| 9993 | |
| 9994 | if (!mEndsFound.Add(end)) |
| 9995 | return; |
| 9996 | |
| 9997 | int lineCount = 1; |
| 9998 | for (int i = anchor; i < end; i++) |
| 9999 | { |
| 10000 | if (mParser->mSrc[i] == '\n') |
| 10001 | { |
| 10002 | lineCount++; |
| 10003 | if (lineCount >= minLines) |
| 10004 | break; |
| 10005 | } |
| 10006 | } |
| 10007 | if (lineCount < minLines) |
| 10008 | return; |
| 10009 | char str[1024]; |
| 10010 | sprintf(str, "%c%d,%d\n", kind, anchor, end); |
| 10011 | mOutString.Append(str); |
| 10012 | } |
| 10013 | |
| 10014 | void Add(BfAstNode* anchor, BfAstNode* end, char kind = '?', int minLines = 2) |
| 10015 | { |
no test coverage detected