recover_postfix_space_in_call.carbon 1.2 KB

1234567891011121314151617181920212223
  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: %{carbon-run-parser}
  7. // CHECK:STDOUT: [
  8. // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'},
  9. // CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'},
  10. // CHECK:STDOUT: {kind: 'Literal', text: 'i8'},
  11. // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3},
  12. // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='},
  13. // CHECK:STDOUT: {kind: 'NameReference', text: 'F'},
  14. // CHECK:STDOUT: {kind: 'CallExpressionStart', text: '(', subtree_size: 2},
  15. // CHECK:STDOUT: {kind: 'Literal', text: 'i8'},
  16. // CHECK:STDOUT: {kind: 'PostfixOperator', text: '*', subtree_size: 2},
  17. // CHECK:STDOUT: {kind: 'CallExpression', text: ')', subtree_size: 5},
  18. // CHECK:STDOUT: {kind: 'VariableDeclaration', text: ';', subtree_size: 11},
  19. // CHECK:STDOUT: {kind: 'FileEnd', text: ''},
  20. // CHECK:STDOUT: ]
  21. // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/recover_postfix_space_in_call.carbon:[[@LINE+1]]:18: Whitespace is not allowed before this unary operator.
  22. var n: i8 = F(i8 *);