mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Remove node_stack Peek templating where possible (#4801)
The "templated for consistency" variants felt a little confusing when I was working on #4795, so suggesting to remove templating where it's not helpful to instantiate (particularly when there were both templated and non-templated variants). Note this leaves a `PeekIs<IdT>` because there's indirection there, but that's more the exception than the rule.
This commit is contained in:
@@ -17,7 +17,7 @@ auto HandleParseNode(Context& context, Parse::ImplicitParamListStartId node_id)
|
||||
|
||||
auto HandleParseNode(Context& context, Parse::ImplicitParamListId node_id)
|
||||
-> bool {
|
||||
if (context.node_stack().PeekIs<Parse::NodeKind::ImplicitParamListStart>()) {
|
||||
if (context.node_stack().PeekIs(Parse::NodeKind::ImplicitParamListStart)) {
|
||||
// End the subpattern started by a trailing comma, or the opening delimiter
|
||||
// of an empty list.
|
||||
context.EndSubpatternAsEmpty();
|
||||
|
||||
Reference in New Issue
Block a user