prefix_repeat.carbon 1015 B

12345678910111213141516171819202122
  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:STDOUT: [
  7. // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'},
  8. // CHECK:STDOUT: {kind: 'Name', text: 'F'},
  9. // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('},
  10. // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2},
  11. // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5},
  12. // CHECK:STDOUT: {kind: 'NameExpression', text: 'n'},
  13. // CHECK:STDOUT: {kind: 'PrefixOperator', text: '++', subtree_size: 2},
  14. // CHECK:STDOUT: {kind: 'PrefixOperator', text: '++', subtree_size: 3},
  15. // CHECK:STDOUT: {kind: 'ExpressionStatement', text: ';', subtree_size: 4},
  16. // CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 10},
  17. // CHECK:STDOUT: {kind: 'FileEnd', text: ''},
  18. // CHECK:STDOUT: ]
  19. fn F() {
  20. ++++n;
  21. }