Split out context targets for check and parse. (#3558)

Per request on #3556.

Note, I'm assuming handlers should remain in the same target as the
caller for longer-term performance reasons.
This commit is contained in:
Jon Ross-Perkins
2024-01-03 22:25:38 +00:00
committed by GitHub
parent c8b30d3eec
commit 95746df788
6 changed files with 60 additions and 32 deletions
+4
View File
@@ -10,6 +10,10 @@
namespace Carbon::Parse {
// Declare handlers for each parse state.
#define CARBON_PARSE_STATE(Name) auto Handle##Name(Context& context) -> void;
#include "toolchain/parse/state.def"
auto HandleInvalid(Context& context) -> void {
CARBON_FATAL() << "The Invalid state shouldn't be on the stack: "
<< context.PopState();