| 857 | } |
| 858 | |
| 859 | static bool ExpectRaw(PreprocessorDirectiveContext* context, CoreLib::Text::TokenType tokenType, DiagnosticInfo const& diagnostic, Token* outToken = NULL) |
| 860 | { |
| 861 | if (PeekRawTokenType(context) != tokenType) |
| 862 | { |
| 863 | // Only report the first parse error within a directive |
| 864 | if (!context->parseError) |
| 865 | { |
| 866 | GetSink(context)->diagnose(PeekLoc(context), diagnostic, tokenType, GetDirectiveName(context)); |
| 867 | } |
| 868 | context->parseError = true; |
| 869 | return false; |
| 870 | } |
| 871 | Token const& token = AdvanceRawToken(context); |
| 872 | if (outToken) |
| 873 | *outToken = token; |
| 874 | return true; |
| 875 | } |
| 876 | |
| 877 | static bool Expect(PreprocessorDirectiveContext* context, CoreLib::Text::TokenType tokenType, DiagnosticInfo const& diagnostic, Token* outToken = NULL) |
| 878 | { |
no test coverage detected