modifiers.carbon 1.2 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. // TIP: To test this file alone, run:
  7. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/parse/testdata/packages/package/modifiers.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/package/modifiers.carbon
  10. // Diagnosed in check.
  11. extend virtual base package Geometry;
  12. // CHECK:STDOUT: - filename: modifiers.carbon
  13. // CHECK:STDOUT: parse_tree: [
  14. // CHECK:STDOUT: {kind: 'FileStart', text: ''},
  15. // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'},
  16. // CHECK:STDOUT: {kind: 'ExtendModifier', text: 'extend'},
  17. // CHECK:STDOUT: {kind: 'VirtualModifier', text: 'virtual'},
  18. // CHECK:STDOUT: {kind: 'BaseModifier', text: 'base'},
  19. // CHECK:STDOUT: {kind: 'IdentifierPackageName', text: 'Geometry'},
  20. // CHECK:STDOUT: {kind: 'PackageDecl', text: ';', subtree_size: 6},
  21. // CHECK:STDOUT: {kind: 'FileEnd', text: ''},
  22. // CHECK:STDOUT: ]