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:
Jon Ross-Perkins
2025-01-15 22:12:22 +00:00
committed by GitHub
parent e0f9c40f47
commit f7269482fe
4 changed files with 12 additions and 29 deletions
+1 -1
View File
@@ -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();