| 538 | } |
| 539 | |
| 540 | void BfParser::UnexpectedCharacter() |
| 541 | { |
| 542 | if (mPreprocessorIgnoredSectionNode != NULL) |
| 543 | return; |
| 544 | |
| 545 | int startIdx = mTokenStart; |
| 546 | int endIdx = startIdx; |
| 547 | char32_t c = u8_nextchar((char*)mSrc, &endIdx); |
| 548 | int charLen = endIdx - startIdx; |
| 549 | |
| 550 | String str = "Unexpected character '"; |
| 551 | for (int i = 0; i < charLen; i++) |
| 552 | str += mSrc[startIdx + i]; |
| 553 | str += StrFormat("' (0x%0X)", (int)c); |
| 554 | |
| 555 | mPassInstance->FailAt(str, mSourceData, startIdx); |
| 556 | mSrcIdx = endIdx; |
| 557 | } |
| 558 | |
| 559 | void BfParser::TokenFail(const StringImpl& error, int offset) |
| 560 | { |