Parse tree for impl that is better for check stage (#3678)

Use two different nodes for "<type> followed by `as`" and "<type>
omitted before `as`, use `self`", so it is easier to determine which
case. Later the second case will push the type id for `self` onto the
node stack, making the two paths more similar.

---------

Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
This commit is contained in:
josh11b
2024-02-01 22:23:21 +00:00
committed by GitHub
co-authored by Jon Ross-Perkins
parent efde1497c4
commit 03bf22e55e
11 changed files with 88 additions and 56 deletions
+1
View File
@@ -488,6 +488,7 @@ class NodeStack {
case Parse::NodeKind::ShortCircuitOperandOr:
case Parse::NodeKind::StructFieldValue:
case Parse::NodeKind::StructFieldType:
case Parse::NodeKind::TypeImplAs:
case Parse::NodeKind::VariableInitializer:
return IdKind::InstId;
case Parse::NodeKind::IfCondition: