base.carbon 1.6 KB

1234567891011121314151617181920212223242526272829303132333435
  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. base class B {}
  7. class D {
  8. base: B;
  9. base class Nested;
  10. }
  11. // CHECK:STDOUT: - filename: base.carbon
  12. // CHECK:STDOUT: parse_tree: [
  13. // CHECK:STDOUT: {kind: 'FileStart', text: ''},
  14. // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'},
  15. // CHECK:STDOUT: {kind: 'DeclModifierKeyword', text: 'base'},
  16. // CHECK:STDOUT: {kind: 'Name', text: 'B'},
  17. // CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 4},
  18. // CHECK:STDOUT: {kind: 'ClassDefinition', text: '}', subtree_size: 5},
  19. // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'},
  20. // CHECK:STDOUT: {kind: 'Name', text: 'D'},
  21. // CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 3},
  22. // CHECK:STDOUT: {kind: 'BaseIntroducer', text: 'base'},
  23. // CHECK:STDOUT: {kind: 'BaseColon', text: ':'},
  24. // CHECK:STDOUT: {kind: 'NameExpr', text: 'B'},
  25. // CHECK:STDOUT: {kind: 'BaseDecl', text: ';', subtree_size: 4},
  26. // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'},
  27. // CHECK:STDOUT: {kind: 'DeclModifierKeyword', text: 'base'},
  28. // CHECK:STDOUT: {kind: 'Name', text: 'Nested'},
  29. // CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 4},
  30. // CHECK:STDOUT: {kind: 'ClassDefinition', text: '}', subtree_size: 12},
  31. // CHECK:STDOUT: {kind: 'FileEnd', text: ''},
  32. // CHECK:STDOUT: ]