mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 09:34:42 +01:00
Update parse tree yaml for multi-file. (#3215)
Building on #3214, updates parse tree yaml to be: ``` - filename: name parse_tree: [ ... ] ```
This commit is contained in:
+35
-34
@@ -26,37 +26,38 @@ fn F() {
|
||||
// CHECK:STDERR: ^
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: [
|
||||
// CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'},
|
||||
// CHECK:STDOUT: {kind: 'Name', text: 'F'},
|
||||
// CHECK:STDOUT: {kind: 'ParameterListStart', text: '('},
|
||||
// CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2},
|
||||
// CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5},
|
||||
// CHECK:STDOUT: {kind: 'IfConditionStart', text: 'if', has_error: yes},
|
||||
// CHECK:STDOUT: {kind: 'NameExpression', 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},
|
||||
// CHECK:STDOUT: {kind: 'IfStatement', text: 'if', subtree_size: 6},
|
||||
// CHECK:STDOUT: {kind: 'IfConditionStart', text: '('},
|
||||
// CHECK:STDOUT: {kind: 'InvalidParse', text: ')', has_error: yes},
|
||||
// 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: 'NameExpression', 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: 'NameExpression', 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},
|
||||
// CHECK:STDOUT: {kind: 'CodeBlock', text: '}', has_error: yes, subtree_size: 3},
|
||||
// CHECK:STDOUT: {kind: 'IfStatement', text: 'if', subtree_size: 7},
|
||||
// CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 31},
|
||||
// CHECK:STDOUT: {kind: 'FileEnd', text: ''},
|
||||
// CHECK:STDOUT: ]
|
||||
// CHECK:STDOUT: - filename: fail_errors.carbon
|
||||
// CHECK:STDOUT: parse_tree: [
|
||||
// CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'},
|
||||
// CHECK:STDOUT: {kind: 'Name', text: 'F'},
|
||||
// CHECK:STDOUT: {kind: 'ParameterListStart', text: '('},
|
||||
// CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2},
|
||||
// CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5},
|
||||
// CHECK:STDOUT: {kind: 'IfConditionStart', text: 'if', has_error: yes},
|
||||
// CHECK:STDOUT: {kind: 'NameExpression', 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},
|
||||
// CHECK:STDOUT: {kind: 'IfStatement', text: 'if', subtree_size: 6},
|
||||
// CHECK:STDOUT: {kind: 'IfConditionStart', text: '('},
|
||||
// CHECK:STDOUT: {kind: 'InvalidParse', text: ')', has_error: yes},
|
||||
// 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: 'NameExpression', 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: 'NameExpression', 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},
|
||||
// CHECK:STDOUT: {kind: 'CodeBlock', text: '}', has_error: yes, subtree_size: 3},
|
||||
// CHECK:STDOUT: {kind: 'IfStatement', text: 'if', subtree_size: 7},
|
||||
// CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 31},
|
||||
// CHECK:STDOUT: {kind: 'FileEnd', text: ''},
|
||||
// CHECK:STDOUT: ]
|
||||
|
||||
Reference in New Issue
Block a user