c488c3e1283e14e163f81c7155f5f3deb99ec993 3.9 KB

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