mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 18:31:08 +01:00
Support for global variables is still missing; they're a bit more tricky because they use a pattern to introduce their name. Prior to this change, explorer heavily relied on name comparisons to determine whether two declarations declare the same entity. Some of those instances are fixed in this PR, but more remain to be fixed, and some TODOs are added for some harder-to-fix instances.
1670 lines
51 KiB
Plaintext
1670 lines
51 KiB
Plaintext
compilation_unit {
|
|
package_statement {
|
|
package_name: "ExplorerTest"
|
|
}
|
|
is_api: true
|
|
declarations {
|
|
choice {
|
|
name {
|
|
name: "AB"
|
|
}
|
|
alternatives {
|
|
name: "A"
|
|
signature {
|
|
}
|
|
}
|
|
alternatives {
|
|
name: "B"
|
|
signature {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declarations {
|
|
function {
|
|
name {
|
|
name: "F"
|
|
}
|
|
param_pattern {
|
|
}
|
|
return_term {
|
|
kind: Expression
|
|
type {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
body {
|
|
statements {
|
|
return_expression_statement {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declarations {
|
|
function {
|
|
name {
|
|
name: "Main"
|
|
}
|
|
param_pattern {
|
|
}
|
|
return_term {
|
|
kind: Expression
|
|
type {
|
|
int_type_literal {
|
|
}
|
|
}
|
|
}
|
|
body {
|
|
statements {
|
|
match {
|
|
expression {
|
|
tuple_literal {
|
|
fields {
|
|
call {
|
|
function {
|
|
identifier {
|
|
name: "F"
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
call {
|
|
function {
|
|
identifier {
|
|
name: "F"
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
call {
|
|
function {
|
|
identifier {
|
|
name: "F"
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
call {
|
|
function {
|
|
identifier {
|
|
name: "F"
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
call {
|
|
function {
|
|
identifier {
|
|
name: "F"
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
call {
|
|
function {
|
|
identifier {
|
|
name: "F"
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
call {
|
|
function {
|
|
identifier {
|
|
name: "F"
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
call {
|
|
function {
|
|
identifier {
|
|
name: "F"
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
clauses {
|
|
pattern {
|
|
expression_pattern {
|
|
expression {
|
|
tuple_literal {
|
|
fields {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
statement {
|
|
block {
|
|
statements {
|
|
return_expression_statement {
|
|
expression {
|
|
int_literal {
|
|
value: 0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
clauses {
|
|
pattern {
|
|
expression_pattern {
|
|
expression {
|
|
tuple_literal {
|
|
fields {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "B"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
statement {
|
|
block {
|
|
statements {
|
|
return_expression_statement {
|
|
expression {
|
|
int_literal {
|
|
value: 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
clauses {
|
|
pattern {
|
|
tuple_pattern {
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "B"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
statement {
|
|
block {
|
|
statements {
|
|
return_expression_statement {
|
|
expression {
|
|
int_literal {
|
|
value: 2
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
clauses {
|
|
pattern {
|
|
tuple_pattern {
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "B"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
statement {
|
|
block {
|
|
statements {
|
|
return_expression_statement {
|
|
expression {
|
|
int_literal {
|
|
value: 3
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
clauses {
|
|
pattern {
|
|
tuple_pattern {
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "B"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
statement {
|
|
block {
|
|
statements {
|
|
return_expression_statement {
|
|
expression {
|
|
int_literal {
|
|
value: 4
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
clauses {
|
|
pattern {
|
|
tuple_pattern {
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "B"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
statement {
|
|
block {
|
|
statements {
|
|
return_expression_statement {
|
|
expression {
|
|
int_literal {
|
|
value: 5
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
clauses {
|
|
pattern {
|
|
tuple_pattern {
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "B"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
statement {
|
|
block {
|
|
statements {
|
|
return_expression_statement {
|
|
expression {
|
|
int_literal {
|
|
value: 6
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
clauses {
|
|
pattern {
|
|
tuple_pattern {
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "B"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "A"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
statement {
|
|
block {
|
|
statements {
|
|
return_expression_statement {
|
|
expression {
|
|
int_literal {
|
|
value: 7
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
clauses {
|
|
pattern {
|
|
tuple_pattern {
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
binding_pattern {
|
|
name: "_"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields {
|
|
expression_pattern {
|
|
expression {
|
|
call {
|
|
function {
|
|
simple_member_access {
|
|
field: "B"
|
|
object {
|
|
identifier {
|
|
name: "AB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
argument {
|
|
tuple_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
statement {
|
|
block {
|
|
statements {
|
|
return_expression_statement {
|
|
expression {
|
|
int_literal {
|
|
value: 8
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|