| 2643 | } |
| 2644 | |
| 2645 | void ReadExpecting(char expected) |
| 2646 | { |
| 2647 | // skip prepending invalid chars |
| 2648 | // expanded the outermost loop in nextTokenHead() for performance |
| 2649 | int c; |
| 2650 | while (isspace(c = this->Getc())) // isspace() accepts -1 as EOF |
| 2651 | { |
| 2652 | if (c == '\n') |
| 2653 | { |
| 2654 | ++this->Superclass::LineNumber; |
| 2655 | #if VTK_FOAMFILE_RECOGNIZE_LINEHEAD |
| 2656 | this->Superclass::WasNewline = true; |
| 2657 | #endif |
| 2658 | } |
| 2659 | } |
| 2660 | if (c == '/') |
| 2661 | { |
| 2662 | this->PutBack(c); |
| 2663 | c = this->NextTokenHead(); |
| 2664 | } |
| 2665 | if (c != expected) |
| 2666 | { |
| 2667 | this->ThrowUnexpectedTokenException(expected, c); |
| 2668 | } |
| 2669 | } |
| 2670 | |
| 2671 | void ReadExpecting(const char* str) |
| 2672 | { |
no test coverage detected