123fb6fa380b035e905b35aab5af9e28b936470f 2.0 KB

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