f4442e613969488b64b568701f015baa552df409 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. compilation_unit {
  2. package_statement {
  3. package_name: "ExplorerTest"
  4. }
  5. is_api: true
  6. declarations {
  7. namespace {
  8. name {
  9. name: "N"
  10. }
  11. }
  12. }
  13. declarations {
  14. mixin {
  15. name {
  16. qualifiers: "N"
  17. name: "Mixin"
  18. }
  19. self {
  20. name: "Self"
  21. type {
  22. type_type_literal {
  23. }
  24. }
  25. }
  26. }
  27. }
  28. declarations {
  29. class_declaration {
  30. name {
  31. qualifiers: "N"
  32. name: "BaseClass"
  33. }
  34. members {
  35. mix {
  36. mixin {
  37. identifier {
  38. name: "Mixin"
  39. }
  40. }
  41. }
  42. }
  43. }
  44. }
  45. declarations {
  46. class_declaration {
  47. name {
  48. qualifiers: "N"
  49. name: "DerivedClass"
  50. }
  51. }
  52. }
  53. declarations {
  54. namespace {
  55. name {
  56. qualifiers: "N"
  57. name: "Inner"
  58. }
  59. }
  60. }
  61. declarations {
  62. alias {
  63. name {
  64. qualifiers: "N"
  65. qualifiers: "Inner"
  66. name: "InnerClass"
  67. }
  68. target {
  69. identifier {
  70. name: "DerivedClass"
  71. }
  72. }
  73. }
  74. }
  75. declarations {
  76. choice {
  77. name {
  78. qualifiers: "N"
  79. name: "Choice"
  80. }
  81. alternatives {
  82. name: "A"
  83. signature {
  84. }
  85. }
  86. alternatives {
  87. name: "B"
  88. signature {
  89. }
  90. }
  91. alternatives {
  92. name: "C"
  93. signature {
  94. fields {
  95. identifier {
  96. name: "DerivedClass"
  97. }
  98. }
  99. }
  100. }
  101. }
  102. }
  103. declarations {
  104. interface {
  105. name {
  106. qualifiers: "N"
  107. name: "Iface"
  108. }
  109. members {
  110. function {
  111. name {
  112. name: "F"
  113. }
  114. param_pattern {
  115. }
  116. return_term {
  117. kind: Expression
  118. type {
  119. operator {
  120. op: Ptr
  121. arguments {
  122. identifier {
  123. name: "DerivedClass"
  124. }
  125. }
  126. }
  127. }
  128. }
  129. }
  130. }
  131. }
  132. }
  133. declarations {
  134. constraint {
  135. name {
  136. qualifiers: "N"
  137. name: "Constraint"
  138. }
  139. members {
  140. interface_extends {
  141. base {
  142. identifier {
  143. name: "Iface"
  144. }
  145. }
  146. }
  147. }
  148. }
  149. }
  150. declarations {
  151. variable {
  152. binding {
  153. name: "v"
  154. type {
  155. expression_pattern {
  156. expression {
  157. simple_member_access {
  158. field: "DerivedClass"
  159. object {
  160. identifier {
  161. name: "N"
  162. }
  163. }
  164. }
  165. }
  166. }
  167. }
  168. }
  169. initializer {
  170. struct_literal {
  171. fields {
  172. name: "base"
  173. expression {
  174. struct_literal {
  175. }
  176. }
  177. }
  178. }
  179. }
  180. }
  181. }
  182. declarations {
  183. function {
  184. name {
  185. qualifiers: "N"
  186. name: "F"
  187. }
  188. deduced_parameters {
  189. name: "T"
  190. type {
  191. identifier {
  192. name: "Constraint"
  193. }
  194. }
  195. }
  196. param_pattern {
  197. }
  198. return_term {
  199. kind: Omitted
  200. }
  201. body {
  202. statements {
  203. variable_definition {
  204. pattern {
  205. binding_pattern {
  206. name: "v"
  207. type {
  208. expression_pattern {
  209. expression {
  210. simple_member_access {
  211. field: "InnerClass"
  212. object {
  213. identifier {
  214. name: "Inner"
  215. }
  216. }
  217. }
  218. }
  219. }
  220. }
  221. }
  222. }
  223. init {
  224. struct_literal {
  225. fields {
  226. name: "base"
  227. expression {
  228. struct_literal {
  229. }
  230. }
  231. }
  232. }
  233. }
  234. is_returned: false
  235. }
  236. }
  237. }
  238. }
  239. }
  240. declarations {
  241. impl {
  242. kind: InternalImpl
  243. impl_type {
  244. int_type_literal {
  245. }
  246. }
  247. interface {
  248. simple_member_access {
  249. field: "Constraint"
  250. object {
  251. identifier {
  252. name: "N"
  253. }
  254. }
  255. }
  256. }
  257. members {
  258. function {
  259. name {
  260. name: "F"
  261. }
  262. param_pattern {
  263. }
  264. return_term {
  265. kind: Expression
  266. type {
  267. operator {
  268. op: Ptr
  269. arguments {
  270. simple_member_access {
  271. field: "DerivedClass"
  272. object {
  273. identifier {
  274. name: "N"
  275. }
  276. }
  277. }
  278. }
  279. }
  280. }
  281. }
  282. body {
  283. statements {
  284. return_expression_statement {
  285. expression {
  286. operator {
  287. op: AddressOf
  288. arguments {
  289. identifier {
  290. name: "v"
  291. }
  292. }
  293. }
  294. }
  295. }
  296. }
  297. }
  298. }
  299. }
  300. }
  301. }
  302. declarations {
  303. function {
  304. name {
  305. name: "Main"
  306. }
  307. param_pattern {
  308. }
  309. return_term {
  310. kind: Expression
  311. type {
  312. int_type_literal {
  313. }
  314. }
  315. }
  316. body {
  317. statements {
  318. return_expression_statement {
  319. expression {
  320. int_literal {
  321. value: 0
  322. }
  323. }
  324. }
  325. }
  326. }
  327. }
  328. }
  329. }