fail_paren_match_regression.carbon 1.1 KB

12345678910111213141516171819
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // AUTOUPDATE
  6. // RUN: %{not} %{carbon-run-parser}
  7. // CHECK:STDOUT: [
  8. // CHECK:STDOUT: {kind: 'NameReference', text: 'foo'},
  9. // CHECK:STDOUT: {kind: 'ParenExpressionEnd', text: ')'},
  10. // CHECK:STDOUT: {kind: 'ParenExpression', text: '(', has_error: yes, subtree_size: 3},
  11. // CHECK:STDOUT: {kind: 'VariableInitializer', text: '=', subtree_size: 4},
  12. // CHECK:STDOUT: {kind: 'VariableDeclaration', text: 'var', has_error: yes, subtree_size: 5},
  13. // CHECK:STDOUT: {kind: 'FileEnd', text: ''},
  14. // CHECK:STDOUT: ]
  15. // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/basics/fail_paren_match_regression.carbon:[[@LINE+3]]:5: Expected pattern in `var` declaration.
  16. // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/basics/fail_paren_match_regression.carbon:[[@LINE+2]]:12: Expected `,` or `)`.
  17. // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/basics/fail_paren_match_regression.carbon:[[@LINE+1]]:15: Expected `;` after expression.
  18. var = (foo {})