e97c6a39ea33c93381c166c96e33b29658320b75 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. compilation_unit {
  2. package_statement {
  3. package_name: "ExplorerTest"
  4. }
  5. is_api: true
  6. declarations {
  7. namespace {
  8. name {
  9. name: "N"
  10. }
  11. }
  12. }
  13. declarations {
  14. function {
  15. name {
  16. name: "OuterI32"
  17. }
  18. param_pattern {
  19. }
  20. return_term {
  21. kind: Expression
  22. type {
  23. type_type_literal {
  24. }
  25. }
  26. }
  27. body {
  28. statements {
  29. return_expression_statement {
  30. expression {
  31. int_type_literal {
  32. }
  33. }
  34. }
  35. }
  36. }
  37. }
  38. }
  39. declarations {
  40. function {
  41. name {
  42. name: "One"
  43. }
  44. param_pattern {
  45. }
  46. return_term {
  47. kind: Expression
  48. type {
  49. int_type_literal {
  50. }
  51. }
  52. }
  53. body {
  54. statements {
  55. return_expression_statement {
  56. expression {
  57. int_literal {
  58. value: 1
  59. }
  60. }
  61. }
  62. }
  63. }
  64. }
  65. }
  66. declarations {
  67. function {
  68. name {
  69. qualifiers: "N"
  70. name: "I32"
  71. }
  72. param_pattern {
  73. }
  74. return_term {
  75. kind: Expression
  76. type {
  77. type_type_literal {
  78. }
  79. }
  80. }
  81. body {
  82. statements {
  83. return_expression_statement {
  84. expression {
  85. int_type_literal {
  86. }
  87. }
  88. }
  89. }
  90. }
  91. }
  92. }
  93. declarations {
  94. function {
  95. name {
  96. qualifiers: "N"
  97. name: "Five"
  98. }
  99. param_pattern {
  100. }
  101. return_term {
  102. kind: Expression
  103. type {
  104. call {
  105. function {
  106. identifier {
  107. name: "I32"
  108. }
  109. }
  110. argument {
  111. tuple_literal {
  112. }
  113. }
  114. }
  115. }
  116. }
  117. body {
  118. statements {
  119. return_expression_statement {
  120. expression {
  121. int_literal {
  122. value: 5
  123. }
  124. }
  125. }
  126. }
  127. }
  128. }
  129. }
  130. declarations {
  131. function {
  132. name {
  133. qualifiers: "N"
  134. name: "Six"
  135. }
  136. param_pattern {
  137. }
  138. return_term {
  139. kind: Expression
  140. type {
  141. call {
  142. function {
  143. identifier {
  144. name: "OuterI32"
  145. }
  146. }
  147. argument {
  148. tuple_literal {
  149. }
  150. }
  151. }
  152. }
  153. }
  154. body {
  155. statements {
  156. return_expression_statement {
  157. expression {
  158. operator {
  159. op: Add
  160. arguments {
  161. call {
  162. function {
  163. identifier {
  164. name: "Five"
  165. }
  166. }
  167. argument {
  168. tuple_literal {
  169. }
  170. }
  171. }
  172. }
  173. arguments {
  174. call {
  175. function {
  176. identifier {
  177. name: "One"
  178. }
  179. }
  180. argument {
  181. tuple_literal {
  182. }
  183. }
  184. }
  185. }
  186. }
  187. }
  188. }
  189. }
  190. }
  191. }
  192. }
  193. declarations {
  194. function {
  195. name {
  196. name: "Main"
  197. }
  198. param_pattern {
  199. }
  200. return_term {
  201. kind: Expression
  202. type {
  203. int_type_literal {
  204. }
  205. }
  206. }
  207. body {
  208. statements {
  209. return_expression_statement {
  210. expression {
  211. call {
  212. function {
  213. simple_member_access {
  214. field: "Six"
  215. object {
  216. identifier {
  217. name: "N"
  218. }
  219. }
  220. }
  221. }
  222. argument {
  223. tuple_literal {
  224. }
  225. }
  226. }
  227. }
  228. }
  229. }
  230. }
  231. }
  232. }
  233. }