mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 15:51:07 +01:00
Refactor state construction and change how the decl loop makes state. (#3467)
Building on #3463. The PushState+PopState to construct a state feels worth cleanup. The rest is just kind of making it easier to do without adding another PushState overload.
This commit is contained in:
@@ -15,6 +15,11 @@
|
||||
|
||||
namespace Carbon::Parse {
|
||||
|
||||
auto HandleInvalid(Context& context) -> void {
|
||||
CARBON_FATAL() << "The Invalid state shouldn't be on the stack: "
|
||||
<< context.PopState();
|
||||
}
|
||||
|
||||
auto Tree::Parse(Lex::TokenizedBuffer& tokens, DiagnosticConsumer& consumer,
|
||||
llvm::raw_ostream* vlog_stream) -> Tree {
|
||||
Lex::TokenLocationTranslator translator(&tokens);
|
||||
|
||||
Reference in New Issue
Block a user