basic.carbon 1.0 KB

123456789101112131415161718192021222324
  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. class Foo {
  7. fn Baz();
  8. }
  9. // CHECK:STDOUT: - filename: basic.carbon
  10. // CHECK:STDOUT: parse_tree: [
  11. // CHECK:STDOUT: {kind: 'FileStart', text: ''},
  12. // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'},
  13. // CHECK:STDOUT: {kind: 'IdentifierName', text: 'Foo'},
  14. // CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 3},
  15. // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'},
  16. // CHECK:STDOUT: {kind: 'IdentifierName', text: 'Baz'},
  17. // CHECK:STDOUT: {kind: 'TuplePatternStart', text: '('},
  18. // CHECK:STDOUT: {kind: 'TuplePattern', text: ')', subtree_size: 2},
  19. // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 5},
  20. // CHECK:STDOUT: {kind: 'ClassDefinition', text: '}', subtree_size: 9},
  21. // CHECK:STDOUT: {kind: 'FileEnd', text: ''},
  22. // CHECK:STDOUT: ]