d22d12eb1a14d96b87311cb90c6413a41d777fc1 2.1 KB

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