Rename parser dir to parse (#3178)

Continuing with #3070. Just a dir and file rename (mostly removing
prefixes, although for parse_tree_fuzzer and parse_tree_file_test I'm
dropping "tree" instead of "parse"). Everything in the parse dir should
be marked as a move.
This commit is contained in:
Jon Ross-Perkins
2023-09-01 01:35:45 +00:00
committed by GitHub
parent 1c748c0f14
commit c555b39a2c
774 changed files with 127 additions and 127 deletions
+48
View File
@@ -0,0 +1,48 @@
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// AUTOUPDATE
fn F() {
while (a) {
if (b) {
break;
}
if (c) {
continue;
}
}
}
// 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: 'WhileConditionStart', text: '('},
// CHECK:STDOUT: {kind: 'NameExpression', text: 'a'},
// CHECK:STDOUT: {kind: 'WhileCondition', text: ')', subtree_size: 3},
// CHECK:STDOUT: {kind: 'CodeBlockStart', text: '{'},
// CHECK:STDOUT: {kind: 'IfConditionStart', text: '('},
// CHECK:STDOUT: {kind: 'NameExpression', text: 'b'},
// CHECK:STDOUT: {kind: 'IfCondition', text: ')', subtree_size: 3},
// CHECK:STDOUT: {kind: 'CodeBlockStart', text: '{'},
// CHECK:STDOUT: {kind: 'BreakStatementStart', text: 'break'},
// CHECK:STDOUT: {kind: 'BreakStatement', text: ';', subtree_size: 2},
// CHECK:STDOUT: {kind: 'CodeBlock', text: '}', subtree_size: 4},
// CHECK:STDOUT: {kind: 'IfStatement', text: 'if', subtree_size: 8},
// CHECK:STDOUT: {kind: 'IfConditionStart', text: '('},
// CHECK:STDOUT: {kind: 'NameExpression', text: 'c'},
// CHECK:STDOUT: {kind: 'IfCondition', text: ')', subtree_size: 3},
// CHECK:STDOUT: {kind: 'CodeBlockStart', text: '{'},
// CHECK:STDOUT: {kind: 'ContinueStatementStart', text: 'continue'},
// CHECK:STDOUT: {kind: 'ContinueStatement', text: ';', subtree_size: 2},
// CHECK:STDOUT: {kind: 'CodeBlock', text: '}', subtree_size: 4},
// CHECK:STDOUT: {kind: 'IfStatement', text: 'if', subtree_size: 8},
// CHECK:STDOUT: {kind: 'CodeBlock', text: '}', subtree_size: 18},
// CHECK:STDOUT: {kind: 'WhileStatement', text: 'while', subtree_size: 22},
// CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 28},
// CHECK:STDOUT: {kind: 'FileEnd', text: ''},
// CHECK:STDOUT: ]
+54
View File
@@ -0,0 +1,54 @@
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// AUTOUPDATE
fn F() {
while (a) {
if (b) {
break
// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+3]]:5: `break` statements must end with a `;`.
// CHECK:STDERR: }
// CHECK:STDERR: ^
}
if (c) {
continue
// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+3]]:5: `continue` statements must end with a `;`.
// CHECK:STDERR: }
// 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: 'WhileConditionStart', text: '('},
// CHECK:STDOUT: {kind: 'NameExpression', text: 'a'},
// CHECK:STDOUT: {kind: 'WhileCondition', text: ')', subtree_size: 3},
// CHECK:STDOUT: {kind: 'CodeBlockStart', text: '{'},
// CHECK:STDOUT: {kind: 'IfConditionStart', text: '('},
// CHECK:STDOUT: {kind: 'NameExpression', text: 'b'},
// CHECK:STDOUT: {kind: 'IfCondition', text: ')', subtree_size: 3},
// CHECK:STDOUT: {kind: 'CodeBlockStart', text: '{'},
// CHECK:STDOUT: {kind: 'BreakStatementStart', text: 'break'},
// CHECK:STDOUT: {kind: 'BreakStatement', text: 'break', has_error: yes, subtree_size: 2},
// CHECK:STDOUT: {kind: 'CodeBlock', text: '}', subtree_size: 4},
// CHECK:STDOUT: {kind: 'IfStatement', text: 'if', subtree_size: 8},
// CHECK:STDOUT: {kind: 'IfConditionStart', text: '('},
// CHECK:STDOUT: {kind: 'NameExpression', text: 'c'},
// CHECK:STDOUT: {kind: 'IfCondition', text: ')', subtree_size: 3},
// CHECK:STDOUT: {kind: 'CodeBlockStart', text: '{'},
// CHECK:STDOUT: {kind: 'ContinueStatementStart', text: 'continue'},
// CHECK:STDOUT: {kind: 'ContinueStatement', text: 'continue', has_error: yes, subtree_size: 2},
// CHECK:STDOUT: {kind: 'CodeBlock', text: '}', subtree_size: 4},
// CHECK:STDOUT: {kind: 'IfStatement', text: 'if', subtree_size: 8},
// CHECK:STDOUT: {kind: 'CodeBlock', text: '}', subtree_size: 18},
// CHECK:STDOUT: {kind: 'WhileStatement', text: 'while', subtree_size: 22},
// CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 28},
// CHECK:STDOUT: {kind: 'FileEnd', text: ''},
// CHECK:STDOUT: ]
+32
View File
@@ -0,0 +1,32 @@
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// TODO: This should have an error.
// AUTOUPDATE
fn F() {
while (a)
// CHECK:STDERR: fail_unbraced.carbon:[[@LINE+3]]:5: Expected braced code block.
// CHECK:STDERR: break;
// CHECK:STDERR: ^
break;
}
// 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: 'WhileConditionStart', text: '('},
// CHECK:STDOUT: {kind: 'NameExpression', text: 'a'},
// CHECK:STDOUT: {kind: 'WhileCondition', text: ')', subtree_size: 3},
// CHECK:STDOUT: {kind: 'CodeBlockStart', text: 'break', has_error: yes},
// CHECK:STDOUT: {kind: 'BreakStatementStart', text: 'break'},
// CHECK:STDOUT: {kind: 'BreakStatement', text: ';', subtree_size: 2},
// CHECK:STDOUT: {kind: 'CodeBlock', text: 'break', has_error: yes, subtree_size: 4},
// CHECK:STDOUT: {kind: 'WhileStatement', text: 'while', subtree_size: 8},
// CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 14},
// CHECK:STDOUT: {kind: 'FileEnd', text: ''},
// CHECK:STDOUT: ]