[cfe-dev] Returning original parsing state after parsing arbitrary tokens

ja_comp ja_comp at yahoo.com
Tue Oct 23 02:44:06 PDT 2012


Assume that a program did the following:

1) Called EnterTokenStream with arbitrary tokens (followed by a Semicolon
and Eof)
2) Called setSuppressAllDiagnostics(true) to keep from emitting errors (in
case the next step fails)
3) Called ParseStatement to produce a StmtResult from the additional tokens
(which may or may not produce a valid result)
4) Lexed tokens (if necessary) to remove any unlexed added tokens
5) Called setSuppressAllDiagnostics(false) to restore error handling

What variables and/or other states should be saved to return the
Preprocessor/Parser/Lexer to the state they were in before step 1?



--
View this message in context: http://clang-developers.42468.n3.nabble.com/Returning-original-parsing-state-after-parsing-arbitrary-tokens-tp4027659.html
Sent from the Clang Developers mailing list archive at Nabble.com.



More information about the cfe-dev mailing list