fail_mismatched_brackets.carbon 1.8 KB

123456789101112131415161718192021222324252627282930313233
  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. // AUTOUPDATE
  5. // CHECK:STDOUT: - filename: fail_mismatched_brackets.carbon
  6. // CHECK:STDOUT: tokens: [
  7. // CHECK:STDOUT: { index: 0, kind: 'FileStart', line: {{ *\d+}}, column: 1, indent: 1, spelling: '', has_trailing_space: true },
  8. // CHECK:STDERR: fail_mismatched_brackets.carbon:[[@LINE+4]]:1: ERROR: Closing symbol without a corresponding opening symbol.
  9. // CHECK:STDERR: }
  10. // CHECK:STDERR: ^
  11. // CHECK:STDERR:
  12. }
  13. // CHECK:STDOUT: { index: 1, kind: 'Error', line: {{ *}}[[@LINE-1]], column: 1, indent: 1, spelling: '}', has_trailing_space: true },
  14. // CHECK:STDERR: fail_mismatched_brackets.carbon:[[@LINE+4]]:3: ERROR: Closing symbol without a corresponding opening symbol.
  15. // CHECK:STDERR: ( } )
  16. // CHECK:STDERR: ^
  17. // CHECK:STDERR:
  18. ( } )
  19. // CHECK:STDOUT: { index: 2, kind: 'OpenParen', line: {{ *}}[[@LINE-1]], column: 1, indent: 1, spelling: '(', closing_token: 4, has_trailing_space: true },
  20. // CHECK:STDOUT: { index: 3, kind: 'Error', line: {{ *}}[[@LINE-2]], column: 3, indent: 1, spelling: '}', has_trailing_space: true },
  21. // CHECK:STDOUT: { index: 4, kind: 'CloseParen', line: {{ *}}[[@LINE-3]], column: 5, indent: 1, spelling: ')', opening_token: 2, has_trailing_space: true },
  22. // CHECK:STDERR: fail_mismatched_brackets.carbon:[[@LINE+3]]:1: ERROR: Opening symbol without a corresponding closing symbol.
  23. // CHECK:STDERR: [
  24. // CHECK:STDERR: ^
  25. [
  26. // CHECK:STDOUT: { index: 5, kind: 'Error', line: {{ *}}[[@LINE-1]], column: 1, indent: 1, spelling: '[', has_trailing_space: true },
  27. // CHECK:STDOUT: { index: 6, kind: 'FileEnd', line: {{ *}}[[@LINE+1]], column: {{ *\d+}}, indent: 1, spelling: '' },
  28. // CHECK:STDOUT: ]