91362973dc5b0ed1e93d5f4e8e1e0b21ed98c3e9 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. compilation_unit {
  2. package_statement {
  3. package_name: "ExplorerTest"
  4. }
  5. is_api: true
  6. declarations {
  7. function {
  8. name {
  9. name: "Main"
  10. }
  11. param_pattern {
  12. }
  13. return_term {
  14. kind: Expression
  15. type {
  16. int_type_literal {
  17. }
  18. }
  19. }
  20. body {
  21. statements {
  22. variable_definition {
  23. pattern {
  24. binding_pattern {
  25. name: "x"
  26. type {
  27. expression_pattern {
  28. expression {
  29. int_type_literal {
  30. }
  31. }
  32. }
  33. }
  34. }
  35. }
  36. init {
  37. int_literal {
  38. value: 0
  39. }
  40. }
  41. is_returned: false
  42. }
  43. }
  44. statements {
  45. continuation {
  46. name: "k"
  47. body {
  48. statements {
  49. assign {
  50. lhs {
  51. identifier {
  52. name: "x"
  53. }
  54. }
  55. rhs {
  56. operator {
  57. op: Add
  58. arguments {
  59. identifier {
  60. name: "x"
  61. }
  62. }
  63. arguments {
  64. int_literal {
  65. value: 1
  66. }
  67. }
  68. }
  69. }
  70. op: Plain
  71. }
  72. }
  73. }
  74. }
  75. }
  76. statements {
  77. run {
  78. argument {
  79. identifier {
  80. name: "k"
  81. }
  82. }
  83. }
  84. }
  85. statements {
  86. return_expression_statement {
  87. expression {
  88. identifier {
  89. name: "x"
  90. }
  91. }
  92. }
  93. }
  94. }
  95. }
  96. }
  97. }