9118596a75bd4e7564935e46f2bcba30498ab3f2 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. compilation_unit {
  2. package_statement {
  3. package_name: "ExplorerTest"
  4. }
  5. is_api: true
  6. declarations {
  7. function {
  8. name: "Main"
  9. param_pattern {
  10. }
  11. return_term {
  12. kind: Expression
  13. type {
  14. int_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: 0
  37. }
  38. }
  39. is_returned: false
  40. }
  41. }
  42. statements {
  43. continuation {
  44. name: "k"
  45. body {
  46. statements {
  47. assign {
  48. lhs {
  49. identifier {
  50. name: "x"
  51. }
  52. }
  53. rhs {
  54. operator {
  55. op: Add
  56. arguments {
  57. identifier {
  58. name: "x"
  59. }
  60. }
  61. arguments {
  62. int_literal {
  63. value: 1
  64. }
  65. }
  66. }
  67. }
  68. }
  69. }
  70. }
  71. }
  72. }
  73. statements {
  74. run {
  75. argument {
  76. identifier {
  77. name: "k"
  78. }
  79. }
  80. }
  81. }
  82. statements {
  83. return_expression_statement {
  84. expression {
  85. identifier {
  86. name: "x"
  87. }
  88. }
  89. }
  90. }
  91. }
  92. }
  93. }
  94. }