Parsing impl...as (#3473)

Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
This commit is contained in:
josh11b
2023-12-09 04:04:00 +00:00
committed by GitHub
co-authored by Jon Ross-Perkins
parent c4864aa2ff
commit 5f439b842b
19 changed files with 650 additions and 116 deletions
@@ -1,24 +0,0 @@
// 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
// CHECK:STDERR: fail_impl.carbon:[[@LINE+3]]:1: ERROR: Unrecognized declaration introducer.
// CHECK:STDERR: impl foo bar;
// CHECK:STDERR: ^~~~
impl foo bar;
// CHECK:STDERR: fail_impl.carbon:[[@LINE+3]]:1: ERROR: Unrecognized declaration introducer.
// CHECK:STDERR: impl
// CHECK:STDERR: ^~~~
impl
// CHECK:STDOUT: - filename: fail_impl.carbon
// CHECK:STDOUT: parse_tree: [
// CHECK:STDOUT: {kind: 'FileStart', text: ''},
// CHECK:STDOUT: {kind: 'InvalidParseStart', text: 'impl', has_error: yes},
// CHECK:STDOUT: {kind: 'InvalidParseSubtree', text: ';', has_error: yes, subtree_size: 2},
// CHECK:STDOUT: {kind: 'InvalidParseStart', text: 'impl', has_error: yes},
// CHECK:STDOUT: {kind: 'InvalidParseSubtree', text: 'impl', has_error: yes, subtree_size: 2},
// CHECK:STDOUT: {kind: 'FileEnd', text: ''},
// CHECK:STDOUT: ]