var.carbon 909 B

12345678910111213141516171819202122
  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. var x: i32;
  8. }
  9. // CHECK:STDOUT: [
  10. // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'},
  11. // CHECK:STDOUT: {kind: 'Name', text: 'Foo'},
  12. // CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 3},
  13. // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'},
  14. // CHECK:STDOUT: {kind: 'Name', text: 'x'},
  15. // CHECK:STDOUT: {kind: 'Literal', text: 'i32'},
  16. // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3},
  17. // CHECK:STDOUT: {kind: 'VariableDeclaration', text: ';', subtree_size: 5},
  18. // CHECK:STDOUT: {kind: 'ClassDefinition', text: '}', subtree_size: 9},
  19. // CHECK:STDOUT: {kind: 'FileEnd', text: ''},
  20. // CHECK:STDOUT: ]