b50aa9e7ace48dadf651bfa991001f91782dcaed 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. compilation_unit {
  2. package_statement {
  3. package_name: "Foo"
  4. }
  5. is_api: true
  6. declarations {
  7. interface {
  8. name {
  9. name: "HasDefault"
  10. }
  11. members {
  12. function {
  13. name {
  14. name: "Default"
  15. }
  16. param_pattern {
  17. }
  18. return_term {
  19. kind: Expression
  20. type {
  21. identifier {
  22. name: "Self"
  23. }
  24. }
  25. }
  26. }
  27. }
  28. }
  29. }
  30. declarations {
  31. impl {
  32. kind: InternalImpl
  33. impl_type {
  34. int_type_literal {
  35. }
  36. }
  37. interface {
  38. identifier {
  39. name: "HasDefault"
  40. }
  41. }
  42. members {
  43. function {
  44. name {
  45. name: "Default"
  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. return_expression_statement {
  59. expression {
  60. int_literal {
  61. value: 42
  62. }
  63. }
  64. }
  65. }
  66. }
  67. }
  68. }
  69. }
  70. }
  71. declarations {
  72. function {
  73. name {
  74. name: "Main"
  75. }
  76. param_pattern {
  77. }
  78. return_term {
  79. kind: Expression
  80. type {
  81. int_type_literal {
  82. }
  83. }
  84. }
  85. body {
  86. statements {
  87. return_expression_statement {
  88. expression {
  89. call {
  90. function {
  91. compound_member_access {
  92. object {
  93. int_type_literal {
  94. }
  95. }
  96. path {
  97. simple_member_access {
  98. field: "Default"
  99. object {
  100. identifier {
  101. name: "HasDefault"
  102. }
  103. }
  104. }
  105. }
  106. }
  107. }
  108. argument {
  109. tuple_literal {
  110. }
  111. }
  112. }
  113. }
  114. }
  115. }
  116. }
  117. }
  118. }
  119. }