mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
Use the same node kind for the body of `case` and `default` handlers. We don't need to distinguish these in check, so don't create extra node kinds for them. In order to make the nodes properly delimited, make the label (`case ...` or `default`) nodes be children of the `=>` node rather than siblings. This allows us to use the node kind of the `=>` as the bracketing node for the complete handler, rather than having two different bracketing node kinds, one for each kind of label.
79 lines
2.4 KiB
C++
79 lines
2.4 KiB
C++
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
#include "toolchain/check/context.h"
|
|
#include "toolchain/check/convert.h"
|
|
#include "toolchain/check/handle.h"
|
|
|
|
namespace Carbon::Check {
|
|
|
|
auto HandleParseNode(Context& context, Parse::MatchConditionStartId node_id)
|
|
-> bool {
|
|
return context.TODO(node_id, "HandleMatchConditionStart");
|
|
}
|
|
|
|
auto HandleParseNode(Context& context, Parse::MatchConditionId node_id)
|
|
-> bool {
|
|
return context.TODO(node_id, "HandleMatchCondition");
|
|
}
|
|
|
|
auto HandleParseNode(Context& context, Parse::MatchIntroducerId node_id)
|
|
-> bool {
|
|
return context.TODO(node_id, "HandleMatchIntroducer");
|
|
}
|
|
|
|
auto HandleParseNode(Context& context, Parse::MatchStatementStartId node_id)
|
|
-> bool {
|
|
return context.TODO(node_id, "HandleMatchStatementStart");
|
|
}
|
|
|
|
auto HandleParseNode(Context& context, Parse::MatchCaseIntroducerId node_id)
|
|
-> bool {
|
|
return context.TODO(node_id, "HandleMatchCaseIntroducer");
|
|
}
|
|
|
|
auto HandleParseNode(Context& context,
|
|
Parse::MatchCaseGuardIntroducerId node_id) -> bool {
|
|
return context.TODO(node_id, "HandleMatchCaseGuardIntroducer");
|
|
}
|
|
|
|
auto HandleParseNode(Context& context, Parse::MatchCaseGuardStartId node_id)
|
|
-> bool {
|
|
return context.TODO(node_id, "HandleMatchCaseGuardStart");
|
|
}
|
|
|
|
auto HandleParseNode(Context& context, Parse::MatchCaseGuardId node_id)
|
|
-> bool {
|
|
return context.TODO(node_id, "HandleMatchCaseGuard");
|
|
}
|
|
|
|
auto HandleParseNode(Context& context, Parse::MatchCaseId node_id) -> bool {
|
|
return context.TODO(node_id, "HandleMatchCase");
|
|
}
|
|
|
|
auto HandleParseNode(Context& context, Parse::MatchDefaultIntroducerId node_id)
|
|
-> bool {
|
|
return context.TODO(node_id, "MatchDefaultIntroducer");
|
|
}
|
|
|
|
auto HandleParseNode(Context& context, Parse::MatchDefaultId node_id) -> bool {
|
|
return context.TODO(node_id, "HandleMatchDefault");
|
|
}
|
|
|
|
auto HandleParseNode(Context& context, Parse::MatchHandlerStartId node_id)
|
|
-> bool {
|
|
return context.TODO(node_id, "HandleMatchHandlerStart");
|
|
}
|
|
|
|
auto HandleParseNode(Context& context, Parse::MatchHandlerId node_id) -> bool {
|
|
return context.TODO(node_id, "HandleMatchHandler");
|
|
}
|
|
|
|
auto HandleParseNode(Context& context, Parse::MatchStatementId node_id)
|
|
-> bool {
|
|
return context.TODO(node_id, "HandleMatchStatement");
|
|
}
|
|
|
|
} // namespace Carbon::Check
|