fail_invalid_braces.carbon 1.3 KB

12345678910111213141516171819202122232425262728
  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. // CHECK:STDERR: fail_invalid_braces.carbon:[[@LINE+4]]:22: ERROR: Choice definition expected.
  7. // CHECK:STDERR: choice InvalidBraces |
  8. // CHECK:STDERR: ^
  9. // CHECK:STDERR:
  10. choice InvalidBraces |
  11. Some
  12. // CHECK:STDERR: fail_invalid_braces.carbon:[[@LINE+3]]:1: ERROR: Unrecognized declaration introducer.
  13. // CHECK:STDERR: |
  14. // CHECK:STDERR: ^
  15. |
  16. // CHECK:STDOUT: - filename: fail_invalid_braces.carbon
  17. // CHECK:STDOUT: parse_tree: [
  18. // CHECK:STDOUT: {kind: 'FileStart', text: ''},
  19. // CHECK:STDOUT: {kind: 'ChoiceIntroducer', text: 'choice'},
  20. // CHECK:STDOUT: {kind: 'IdentifierName', text: 'InvalidBraces'},
  21. // CHECK:STDOUT: {kind: 'ChoiceDefinitionStart', text: '|', has_error: yes, subtree_size: 3},
  22. // CHECK:STDOUT: {kind: 'ChoiceDefinition', text: '|', has_error: yes, subtree_size: 4},
  23. // CHECK:STDOUT: {kind: 'InvalidParseStart', text: '|', has_error: yes},
  24. // CHECK:STDOUT: {kind: 'InvalidParseSubtree', text: '|', has_error: yes, subtree_size: 2},
  25. // CHECK:STDOUT: {kind: 'FileEnd', text: ''},
  26. // CHECK:STDOUT: ]