9f2b40328127947524429569157002cc2c8b4113 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. members {
  12. function {
  13. name {
  14. name: "Foo"
  15. }
  16. param_pattern {
  17. }
  18. return_term {
  19. kind: Expression
  20. type {
  21. int_type_literal {
  22. }
  23. }
  24. }
  25. body {
  26. statements {
  27. return_expression_statement {
  28. expression {
  29. int_literal {
  30. value: 1
  31. }
  32. }
  33. }
  34. }
  35. }
  36. }
  37. }
  38. }
  39. }
  40. declarations {
  41. function {
  42. name {
  43. name: "Main"
  44. }
  45. param_pattern {
  46. }
  47. return_term {
  48. kind: Expression
  49. type {
  50. int_type_literal {
  51. }
  52. }
  53. }
  54. body {
  55. statements {
  56. variable_definition {
  57. pattern {
  58. binding_pattern {
  59. name: "c"
  60. type {
  61. expression_pattern {
  62. expression {
  63. identifier {
  64. name: "C"
  65. }
  66. }
  67. }
  68. }
  69. }
  70. }
  71. init {
  72. struct_literal {
  73. }
  74. }
  75. is_returned: false
  76. }
  77. }
  78. statements {
  79. return_expression_statement {
  80. expression {
  81. int_literal {
  82. value: 0
  83. }
  84. }
  85. }
  86. }
  87. }
  88. }
  89. }
  90. }