| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- compilation_unit {
- package_statement {
- package_name: "ExplorerTest"
- }
- is_api: true
- declarations {
- function {
- name {
- name: "Main"
- }
- param_pattern {
- }
- return_term {
- kind: Expression
- type {
- int_type_literal {
- }
- }
- }
- body {
- statements {
- variable_definition {
- pattern {
- binding_pattern {
- name: "x"
- type {
- expression_pattern {
- expression {
- int_type_literal {
- }
- }
- }
- }
- }
- }
- is_returned: false
- }
- }
- statements {
- variable_definition {
- pattern {
- binding_pattern {
- name: "y"
- type {
- expression_pattern {
- expression {
- int_type_literal {
- }
- }
- }
- }
- }
- }
- is_returned: false
- }
- }
- statements {
- if_statement {
- condition {
- operator {
- op: Eq
- arguments {
- int_literal {
- value: 0
- }
- }
- arguments {
- int_literal {
- value: 1
- }
- }
- }
- }
- then_block {
- statements {
- assign {
- lhs {
- identifier {
- name: "x"
- }
- }
- rhs {
- int_literal {
- value: 0
- }
- }
- op: Plain
- }
- }
- }
- }
- }
- statements {
- assign {
- lhs {
- identifier {
- name: "y"
- }
- }
- rhs {
- identifier {
- name: "x"
- }
- }
- op: Plain
- }
- }
- statements {
- return_expression_statement {
- expression {
- identifier {
- name: "y"
- }
- }
- }
- }
- }
- }
- }
- }
|