| 513 | } |
| 514 | |
| 515 | int BfParser::GetIndexAtLine(int line) |
| 516 | { |
| 517 | if (line == 0) |
| 518 | return 0; |
| 519 | |
| 520 | int curLine = 0; |
| 521 | for (int i = 0; i < mSrcLength; i++) |
| 522 | { |
| 523 | char c = mSrc[i]; |
| 524 | if (c == '\n') |
| 525 | { |
| 526 | curLine++; |
| 527 | if (line == curLine) |
| 528 | return i + 1; |
| 529 | } |
| 530 | } |
| 531 | |
| 532 | return -1; |
| 533 | } |
| 534 | |
| 535 | void BfParser::Fail(const StringImpl& error, int offset) |
| 536 | { |
no outgoing calls
no test coverage detected