086eb5f16b73ed72781d5579cdf16dcdc4e94744 3.0 KB

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