mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 18:51:09 +01:00
For now, we require the same introducer to be used each time a class is declared, but see #3384. --------- Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
45 lines
2.1 KiB
Plaintext
45 lines
2.1 KiB
Plaintext
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
// AUTOUPDATE
|
|
|
|
class A;
|
|
base class B;
|
|
abstract class C;
|
|
|
|
class A {}
|
|
base class B {}
|
|
abstract class C {}
|
|
|
|
// CHECK:STDOUT: - filename: introducer.carbon
|
|
// CHECK:STDOUT: parse_tree: [
|
|
// CHECK:STDOUT: {kind: 'FileStart', text: ''},
|
|
// CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'},
|
|
// CHECK:STDOUT: {kind: 'Name', text: 'A'},
|
|
// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 3},
|
|
// CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'},
|
|
// CHECK:STDOUT: {kind: 'BaseModifier', text: 'base'},
|
|
// CHECK:STDOUT: {kind: 'Name', text: 'B'},
|
|
// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 4},
|
|
// CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'},
|
|
// CHECK:STDOUT: {kind: 'AbstractModifier', text: 'abstract'},
|
|
// CHECK:STDOUT: {kind: 'Name', text: 'C'},
|
|
// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 4},
|
|
// CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'},
|
|
// CHECK:STDOUT: {kind: 'Name', text: 'A'},
|
|
// CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 3},
|
|
// CHECK:STDOUT: {kind: 'ClassDefinition', text: '}', subtree_size: 4},
|
|
// CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'},
|
|
// CHECK:STDOUT: {kind: 'BaseModifier', text: 'base'},
|
|
// CHECK:STDOUT: {kind: 'Name', text: 'B'},
|
|
// CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 4},
|
|
// CHECK:STDOUT: {kind: 'ClassDefinition', text: '}', subtree_size: 5},
|
|
// CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'},
|
|
// CHECK:STDOUT: {kind: 'AbstractModifier', text: 'abstract'},
|
|
// CHECK:STDOUT: {kind: 'Name', text: 'C'},
|
|
// CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 4},
|
|
// CHECK:STDOUT: {kind: 'ClassDefinition', text: '}', subtree_size: 5},
|
|
// CHECK:STDOUT: {kind: 'FileEnd', text: ''},
|
|
// CHECK:STDOUT: ]
|