mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Start using typed parse node ids in the check stage (#3547)
Goal is to increase type safety, though more work needs to be done (see added TODOs). Note that, after this change, check handlers corresponding to deleted parse node kinds will no longer compile. --------- Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
This commit is contained in:
co-authored by
Chandler Carruth
parent
a602be89e2
commit
48c986f52d
@@ -9,17 +9,18 @@
|
||||
|
||||
namespace Carbon::Check {
|
||||
|
||||
auto HandleArrayExprStart(Context& /*context*/, Parse::NodeId /*parse_node*/)
|
||||
-> bool {
|
||||
auto HandleArrayExprStart(Context& /*context*/,
|
||||
Parse::ArrayExprStartId /*parse_node*/) -> bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
auto HandleArrayExprSemi(Context& context, Parse::NodeId parse_node) -> bool {
|
||||
auto HandleArrayExprSemi(Context& context, Parse::ArrayExprSemiId parse_node)
|
||||
-> bool {
|
||||
context.node_stack().Push(parse_node);
|
||||
return true;
|
||||
}
|
||||
|
||||
auto HandleArrayExpr(Context& context, Parse::NodeId parse_node) -> bool {
|
||||
auto HandleArrayExpr(Context& context, Parse::ArrayExprId parse_node) -> bool {
|
||||
// TODO: Handle array type with undefined bound.
|
||||
if (context.node_stack()
|
||||
.PopAndDiscardSoloParseNodeIf<Parse::NodeKind::ArrayExprSemi>()) {
|
||||
|
||||
Reference in New Issue
Block a user