mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-03 11:25:49 +01:00
- Rename `PatternBinding` to `BindingPattern`. - Use `BindingPattern` rather than `Pattern` in the names of binding-pattern-specific parse states.
41 lines
2.1 KiB
Plaintext
41 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 Foo(a: i32, b: i32);
|
|
|
|
interface Bar(a: i32, b: i32) {}
|
|
|
|
// CHECK:STDOUT: - filename: two.carbon
|
|
// CHECK:STDOUT: parse_tree: [
|
|
// CHECK:STDOUT: {kind: 'FileStart', text: ''},
|
|
// CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'},
|
|
// CHECK:STDOUT: {kind: 'Name', text: 'Foo'},
|
|
// CHECK:STDOUT: {kind: 'ParamListStart', text: '('},
|
|
// CHECK:STDOUT: {kind: 'Name', text: 'a'},
|
|
// CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'},
|
|
// CHECK:STDOUT: {kind: 'BindingPattern', text: ':', subtree_size: 3},
|
|
// CHECK:STDOUT: {kind: 'ParamListComma', text: ','},
|
|
// CHECK:STDOUT: {kind: 'Name', text: 'b'},
|
|
// CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'},
|
|
// CHECK:STDOUT: {kind: 'BindingPattern', text: ':', subtree_size: 3},
|
|
// CHECK:STDOUT: {kind: 'ParamList', text: ')', subtree_size: 9},
|
|
// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 12},
|
|
// CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'},
|
|
// CHECK:STDOUT: {kind: 'Name', text: 'Bar'},
|
|
// CHECK:STDOUT: {kind: 'ParamListStart', text: '('},
|
|
// CHECK:STDOUT: {kind: 'Name', text: 'a'},
|
|
// CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'},
|
|
// CHECK:STDOUT: {kind: 'BindingPattern', text: ':', subtree_size: 3},
|
|
// CHECK:STDOUT: {kind: 'ParamListComma', text: ','},
|
|
// CHECK:STDOUT: {kind: 'Name', text: 'b'},
|
|
// CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'},
|
|
// CHECK:STDOUT: {kind: 'BindingPattern', text: ':', subtree_size: 3},
|
|
// CHECK:STDOUT: {kind: 'ParamList', text: ')', subtree_size: 9},
|
|
// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 12},
|
|
// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 13},
|
|
// CHECK:STDOUT: {kind: 'FileEnd', text: ''},
|
|
// CHECK:STDOUT: ]
|