mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
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:
co-authored by
Jon Ross-Perkins
parent
efde1497c4
commit
03bf22e55e
+2
-2
@@ -12,8 +12,8 @@ impl i32 as Interface {
|
||||
// CHECK:STDOUT: parse_tree: [
|
||||
// CHECK:STDOUT: {kind: 'FileStart', text: ''},
|
||||
// CHECK:STDOUT: {kind: 'ImplIntroducer', text: 'impl'},
|
||||
// CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'},
|
||||
// CHECK:STDOUT: {kind: 'ImplAs', text: 'as'},
|
||||
// CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'},
|
||||
// CHECK:STDOUT: {kind: 'TypeImplAs', text: 'as', subtree_size: 2},
|
||||
// CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'Interface'},
|
||||
// CHECK:STDOUT: {kind: 'ImplDefinitionStart', text: '{', subtree_size: 5},
|
||||
// CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'},
|
||||
|
||||
Reference in New Issue
Block a user