basic.carbon 1.3 KB

123456789101112131415161718192021222324252627282930
  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. namespace Foo;
  7. fn Bar() {
  8. Foo.Baz();
  9. }
  10. // CHECK:STDOUT: [
  11. // CHECK:STDOUT: {kind: 'NamespaceStart', text: 'namespace'},
  12. // CHECK:STDOUT: {kind: 'Name', text: 'Foo'},
  13. // CHECK:STDOUT: {kind: 'Namespace', text: ';', subtree_size: 3},
  14. // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'},
  15. // CHECK:STDOUT: {kind: 'Name', text: 'Bar'},
  16. // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('},
  17. // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2},
  18. // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5},
  19. // CHECK:STDOUT: {kind: 'NameExpression', text: 'Foo'},
  20. // CHECK:STDOUT: {kind: 'Name', text: 'Baz'},
  21. // CHECK:STDOUT: {kind: 'MemberAccessExpression', text: '.', subtree_size: 3},
  22. // CHECK:STDOUT: {kind: 'CallExpressionStart', text: '(', subtree_size: 4},
  23. // CHECK:STDOUT: {kind: 'CallExpression', text: ')', subtree_size: 5},
  24. // CHECK:STDOUT: {kind: 'ExpressionStatement', text: ';', subtree_size: 6},
  25. // CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 12},
  26. // CHECK:STDOUT: {kind: 'FileEnd', text: ''},
  27. // CHECK:STDOUT: ]