Read one token with macro-expansion enabled. Note that because triggering macro expansion may involve changing the input-stream state, this operation *can* have side effects.
| 713 | // involve changing the input-stream state, this |
| 714 | // operation *can* have side effects. |
| 715 | static Token PeekToken(Preprocessor* preprocessor) |
| 716 | { |
| 717 | // Check whether we need to macro expand at the cursor. |
| 718 | MaybeBeginMacroExpansion(preprocessor); |
| 719 | |
| 720 | // Peek a raw token (now that expansion has been triggered) |
| 721 | return PeekRawToken(preprocessor); |
| 722 | |
| 723 | // TODO: need a plan for how to handle token pasting |
| 724 | // here without it being onerous. Would be nice if we |
| 725 | // didn't have to re-do pasting on a "peek"... |
| 726 | } |
| 727 | |
| 728 | // Peek the type of the next token, including macro expansion. |
| 729 | static CoreLib::Text::TokenType PeekTokenType(Preprocessor* preprocessor) |
no test coverage detected