2345f2c6add76c7aa04327e5aaa0840275740385 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. compilation_unit {
  2. package_statement {
  3. package_name: "ExplorerTest"
  4. }
  5. is_api: true
  6. declarations {
  7. function {
  8. name {
  9. name: "f"
  10. }
  11. param_pattern {
  12. fields {
  13. binding_pattern {
  14. name: "x"
  15. type {
  16. expression_pattern {
  17. expression {
  18. int_type_literal {
  19. }
  20. }
  21. }
  22. }
  23. }
  24. }
  25. fields {
  26. binding_pattern {
  27. name: "y"
  28. type {
  29. expression_pattern {
  30. expression {
  31. int_type_literal {
  32. }
  33. }
  34. }
  35. }
  36. }
  37. }
  38. }
  39. return_term {
  40. kind: Expression
  41. type {
  42. int_type_literal {
  43. }
  44. }
  45. }
  46. body {
  47. statements {
  48. return_expression_statement {
  49. expression {
  50. operator {
  51. op: Add
  52. arguments {
  53. identifier {
  54. name: "x"
  55. }
  56. }
  57. arguments {
  58. identifier {
  59. name: "y"
  60. }
  61. }
  62. }
  63. }
  64. }
  65. }
  66. }
  67. }
  68. }
  69. declarations {
  70. function {
  71. name {
  72. name: "Main"
  73. }
  74. param_pattern {
  75. }
  76. return_term {
  77. kind: Expression
  78. type {
  79. int_type_literal {
  80. }
  81. }
  82. }
  83. body {
  84. statements {
  85. return_expression_statement {
  86. expression {
  87. operator {
  88. op: Sub
  89. arguments {
  90. call {
  91. function {
  92. identifier {
  93. name: "f"
  94. }
  95. }
  96. argument {
  97. tuple_literal {
  98. fields {
  99. int_literal {
  100. value: 2
  101. }
  102. }
  103. fields {
  104. int_literal {
  105. value: 3
  106. }
  107. }
  108. }
  109. }
  110. }
  111. }
  112. arguments {
  113. int_literal {
  114. value: 5
  115. }
  116. }
  117. }
  118. }
  119. }
  120. }
  121. }
  122. }
  123. }
  124. }