1c452ac633219d656ab5904d7638e5379e44a582 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. compilation_unit {
  2. package_statement {
  3. package_name: "ExplorerTest"
  4. }
  5. is_api: true
  6. declarations {
  7. class_declaration {
  8. name {
  9. name: "A"
  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. int_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. int_type_literal {
  61. }
  62. }
  63. }
  64. body {
  65. statements {
  66. return_expression_statement {
  67. expression {
  68. int_literal {
  69. value: 42
  70. }
  71. }
  72. }
  73. }
  74. }
  75. }
  76. }
  77. }
  78. }
  79. }
  80. }
  81. declarations {
  82. function {
  83. name {
  84. name: "Main"
  85. }
  86. param_pattern {
  87. }
  88. return_term {
  89. kind: Expression
  90. type {
  91. int_type_literal {
  92. }
  93. }
  94. }
  95. body {
  96. statements {
  97. variable_definition {
  98. pattern {
  99. binding_pattern {
  100. name: "a"
  101. type {
  102. expression_pattern {
  103. expression {
  104. identifier {
  105. name: "A"
  106. }
  107. }
  108. }
  109. }
  110. }
  111. }
  112. init {
  113. struct_literal {
  114. }
  115. }
  116. is_returned: false
  117. }
  118. }
  119. statements {
  120. return_expression_statement {
  121. expression {
  122. identifier {
  123. name: "a"
  124. }
  125. }
  126. }
  127. }
  128. }
  129. }
  130. }
  131. }