1f137378f423a375a57448370eceee7aaac663ec 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. compilation_unit {
  2. package_statement {
  3. package_name: "ExplorerTest"
  4. }
  5. is_api: true
  6. declarations {
  7. function {
  8. name {
  9. name: "ComputeSum"
  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: Auto
  41. }
  42. }
  43. }
  44. declarations {
  45. function {
  46. name {
  47. name: "Main"
  48. }
  49. param_pattern {
  50. }
  51. return_term {
  52. kind: Expression
  53. type {
  54. int_type_literal {
  55. }
  56. }
  57. }
  58. body {
  59. statements {
  60. return_expression_statement {
  61. expression {
  62. operator {
  63. op: Sub
  64. arguments {
  65. call {
  66. function {
  67. identifier {
  68. name: "ComputeSum"
  69. }
  70. }
  71. argument {
  72. tuple_literal {
  73. fields {
  74. int_literal {
  75. value: 1
  76. }
  77. }
  78. fields {
  79. int_literal {
  80. value: 2
  81. }
  82. }
  83. }
  84. }
  85. }
  86. }
  87. arguments {
  88. int_literal {
  89. value: 3
  90. }
  91. }
  92. }
  93. }
  94. }
  95. }
  96. }
  97. }
  98. }
  99. }