54c240f4335e37fea9731487a93befcf4f0ccf8c 2.2 KB

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