mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Rename Name -> IdentifierName given that we have several other kinds of parse nodes that represent names. (#3453)
Factor out common checking handling for the different kinds of unqualified names
This commit is contained in:
+4
-4
@@ -30,12 +30,12 @@ fn F() {
|
||||
// CHECK:STDOUT: parse_tree: [
|
||||
// CHECK:STDOUT: {kind: 'FileStart', text: ''},
|
||||
// CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'},
|
||||
// CHECK:STDOUT: {kind: 'Name', text: 'F'},
|
||||
// CHECK:STDOUT: {kind: 'IdentifierName', text: 'F'},
|
||||
// CHECK:STDOUT: {kind: 'ParamListStart', text: '('},
|
||||
// CHECK:STDOUT: {kind: 'ParamList', text: ')', subtree_size: 2},
|
||||
// CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5},
|
||||
// CHECK:STDOUT: {kind: 'IfConditionStart', text: 'if', has_error: yes},
|
||||
// CHECK:STDOUT: {kind: 'NameExpr', text: 'a'},
|
||||
// CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'a'},
|
||||
// CHECK:STDOUT: {kind: 'IfCondition', text: 'if', has_error: yes, subtree_size: 3},
|
||||
// CHECK:STDOUT: {kind: 'CodeBlockStart', text: '{'},
|
||||
// CHECK:STDOUT: {kind: 'CodeBlock', text: '}', subtree_size: 2},
|
||||
@@ -47,13 +47,13 @@ fn F() {
|
||||
// CHECK:STDOUT: {kind: 'CodeBlock', text: '}', subtree_size: 2},
|
||||
// CHECK:STDOUT: {kind: 'IfStatement', text: 'if', subtree_size: 6},
|
||||
// CHECK:STDOUT: {kind: 'IfConditionStart', text: '('},
|
||||
// CHECK:STDOUT: {kind: 'NameExpr', text: 'b'},
|
||||
// CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'b'},
|
||||
// CHECK:STDOUT: {kind: 'IfCondition', text: ')', has_error: yes, subtree_size: 3},
|
||||
// CHECK:STDOUT: {kind: 'CodeBlockStart', text: '{'},
|
||||
// CHECK:STDOUT: {kind: 'CodeBlock', text: '}', subtree_size: 2},
|
||||
// CHECK:STDOUT: {kind: 'IfStatement', text: 'if', subtree_size: 6},
|
||||
// CHECK:STDOUT: {kind: 'IfConditionStart', text: '('},
|
||||
// CHECK:STDOUT: {kind: 'NameExpr', text: 'd'},
|
||||
// CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'd'},
|
||||
// CHECK:STDOUT: {kind: 'IfCondition', text: ')', subtree_size: 3},
|
||||
// CHECK:STDOUT: {kind: 'CodeBlockStart', text: '}', has_error: yes},
|
||||
// CHECK:STDOUT: {kind: 'InvalidParse', text: '}', has_error: yes},
|
||||
|
||||
Reference in New Issue
Block a user