da1ba8fc95a22683068aed496a0b97fca851f7a0 3.1 KB

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