869a572f42c6d5ba437c45a7187b350b1bb27c94 2.1 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. param_pattern {
  12. fields {
  13. binding_pattern {
  14. name: "t"
  15. type {
  16. expression_pattern {
  17. expression {
  18. type_type_literal {
  19. }
  20. }
  21. }
  22. }
  23. }
  24. }
  25. }
  26. return_term {
  27. kind: Auto
  28. }
  29. body {
  30. statements {
  31. return_expression_statement {
  32. expression {
  33. identifier {
  34. name: "t"
  35. }
  36. }
  37. }
  38. }
  39. }
  40. }
  41. }
  42. declarations {
  43. function {
  44. name {
  45. name: "Main"
  46. }
  47. param_pattern {
  48. }
  49. return_term {
  50. kind: Expression
  51. type {
  52. int_type_literal {
  53. }
  54. }
  55. }
  56. body {
  57. statements {
  58. variable_definition {
  59. pattern {
  60. binding_pattern {
  61. name: "x"
  62. type {
  63. expression_pattern {
  64. expression {
  65. call {
  66. function {
  67. identifier {
  68. name: "Id"
  69. }
  70. }
  71. argument {
  72. tuple_literal {
  73. fields {
  74. int_type_literal {
  75. }
  76. }
  77. }
  78. }
  79. }
  80. }
  81. }
  82. }
  83. }
  84. }
  85. init {
  86. int_literal {
  87. value: 0
  88. }
  89. }
  90. is_returned: false
  91. }
  92. }
  93. statements {
  94. return_expression_statement {
  95. expression {
  96. identifier {
  97. name: "x"
  98. }
  99. }
  100. }
  101. }
  102. }
  103. }
  104. }
  105. }