5b0199278f094e43e9138a16476f13d3ba564d1f 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. int_type_literal {
  26. }
  27. }
  28. }
  29. }
  30. }
  31. }
  32. }
  33. return_term {
  34. kind: Expression
  35. type {
  36. int_type_literal {
  37. }
  38. }
  39. }
  40. body {
  41. statements {
  42. return_expression_statement {
  43. expression {
  44. identifier {
  45. name: "x"
  46. }
  47. }
  48. }
  49. }
  50. }
  51. }
  52. }
  53. declarations {
  54. function {
  55. name {
  56. name: "Main"
  57. }
  58. param_pattern {
  59. }
  60. return_term {
  61. kind: Expression
  62. type {
  63. int_type_literal {
  64. }
  65. }
  66. }
  67. body {
  68. statements {
  69. return_expression_statement {
  70. expression {
  71. call {
  72. function {
  73. identifier {
  74. name: "id"
  75. }
  76. }
  77. argument {
  78. tuple_literal {
  79. fields {
  80. int_literal {
  81. value: 0
  82. }
  83. }
  84. }
  85. }
  86. }
  87. }
  88. }
  89. }
  90. }
  91. }
  92. }
  93. }