f3454063d1455382b7560e4919d46ff7d4e8edc1 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. compilation_unit {
  2. package_statement {
  3. package_name: "ExplorerTest"
  4. }
  5. is_api: true
  6. declarations {
  7. function {
  8. name {
  9. name: "Main"
  10. }
  11. param_pattern {
  12. }
  13. return_term {
  14. kind: Expression
  15. type {
  16. int_type_literal {
  17. }
  18. }
  19. }
  20. body {
  21. statements {
  22. variable_definition {
  23. pattern {
  24. binding_pattern {
  25. name: "lhs"
  26. type {
  27. expression_pattern {
  28. expression {
  29. int_type_literal {
  30. }
  31. }
  32. }
  33. }
  34. }
  35. }
  36. init {
  37. int_literal {
  38. value: 3
  39. }
  40. }
  41. is_returned: false
  42. }
  43. }
  44. statements {
  45. variable_definition {
  46. pattern {
  47. binding_pattern {
  48. name: "rhs"
  49. type {
  50. expression_pattern {
  51. expression {
  52. int_type_literal {
  53. }
  54. }
  55. }
  56. }
  57. }
  58. }
  59. init {
  60. int_literal {
  61. value: 2
  62. }
  63. }
  64. is_returned: false
  65. }
  66. }
  67. statements {
  68. expression_statement {
  69. expression {
  70. call {
  71. function {
  72. identifier {
  73. name: "Print"
  74. }
  75. }
  76. argument {
  77. tuple_literal {
  78. fields {
  79. string_literal {
  80. value: "Interface: {0}"
  81. }
  82. }
  83. fields {
  84. call {
  85. function {
  86. compound_member_access {
  87. object {
  88. identifier {
  89. name: "lhs"
  90. }
  91. }
  92. path {
  93. simple_member_access {
  94. field: "Op"
  95. object {
  96. call {
  97. function {
  98. identifier {
  99. name: "MulWith"
  100. }
  101. }
  102. argument {
  103. tuple_literal {
  104. fields {
  105. int_type_literal {
  106. }
  107. }
  108. }
  109. }
  110. }
  111. }
  112. }
  113. }
  114. }
  115. }
  116. argument {
  117. tuple_literal {
  118. fields {
  119. identifier {
  120. name: "rhs"
  121. }
  122. }
  123. }
  124. }
  125. }
  126. }
  127. }
  128. }
  129. }
  130. }
  131. }
  132. }
  133. statements {
  134. expression_statement {
  135. expression {
  136. call {
  137. function {
  138. identifier {
  139. name: "Print"
  140. }
  141. }
  142. argument {
  143. tuple_literal {
  144. fields {
  145. string_literal {
  146. value: "Op: {0}"
  147. }
  148. }
  149. fields {
  150. operator {
  151. op: Mul
  152. arguments {
  153. identifier {
  154. name: "lhs"
  155. }
  156. }
  157. arguments {
  158. identifier {
  159. name: "rhs"
  160. }
  161. }
  162. }
  163. }
  164. }
  165. }
  166. }
  167. }
  168. }
  169. }
  170. statements {
  171. return_expression_statement {
  172. expression {
  173. int_literal {
  174. value: 0
  175. }
  176. }
  177. }
  178. }
  179. }
  180. }
  181. }
  182. }