one_entry_no_comma.carbon 1.5 KB

123456789101112131415161718192021222324252627
  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. // CHECK:STDOUT: [
  7. // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'},
  8. // CHECK:STDOUT: {kind: 'Name', text: 'z'},
  9. // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
  10. // CHECK:STDOUT: {kind: 'Name', text: 'n'},
  11. // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
  12. // CHECK:STDOUT: {kind: 'Literal', text: 'i32'},
  13. // CHECK:STDOUT: {kind: 'StructFieldType', text: ':', subtree_size: 4},
  14. // CHECK:STDOUT: {kind: 'StructTypeLiteral', text: '}', subtree_size: 6},
  15. // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 8},
  16. // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='},
  17. // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
  18. // CHECK:STDOUT: {kind: 'Name', text: 'n'},
  19. // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
  20. // CHECK:STDOUT: {kind: 'Literal', text: '4'},
  21. // CHECK:STDOUT: {kind: 'StructFieldValue', text: '=', subtree_size: 4},
  22. // CHECK:STDOUT: {kind: 'StructLiteral', text: '}', subtree_size: 6},
  23. // CHECK:STDOUT: {kind: 'VariableDeclaration', text: ';', subtree_size: 17},
  24. // CHECK:STDOUT: {kind: 'FileEnd', text: ''},
  25. // CHECK:STDOUT: ]
  26. var z: {.n: i32} = {.n = 4};