params_two.carbon 1.1 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: 'FunctionIntroducer', text: 'fn'},
  9. // CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'},
  10. // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('},
  11. // CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'},
  12. // CHECK:STDOUT: {kind: 'Literal', text: 'i32'},
  13. // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3},
  14. // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','},
  15. // CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'},
  16. // CHECK:STDOUT: {kind: 'Literal', text: 'i32'},
  17. // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3},
  18. // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 9},
  19. // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: ';', subtree_size: 12},
  20. // CHECK:STDOUT: {kind: 'FileEnd', text: ''},
  21. // CHECK:STDOUT: ]
  22. fn foo(a: i32, b: i32);