f69e3144cbc99fb1dc4d1c8f7a1547679ffeb93a 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479
  1. compilation_unit {
  2. package_statement {
  3. package_name: "ExplorerTest"
  4. }
  5. is_api: true
  6. declarations {
  7. interface {
  8. name {
  9. name: "A"
  10. }
  11. members {
  12. function {
  13. name {
  14. name: "F"
  15. }
  16. param_pattern {
  17. }
  18. return_term {
  19. kind: Expression
  20. type {
  21. int_type_literal {
  22. }
  23. }
  24. }
  25. }
  26. }
  27. }
  28. }
  29. declarations {
  30. interface {
  31. name {
  32. name: "B"
  33. }
  34. members {
  35. function {
  36. name {
  37. name: "F"
  38. }
  39. param_pattern {
  40. }
  41. return_term {
  42. kind: Expression
  43. type {
  44. int_type_literal {
  45. }
  46. }
  47. }
  48. }
  49. }
  50. members {
  51. function {
  52. name {
  53. name: "G"
  54. }
  55. param_pattern {
  56. }
  57. return_term {
  58. kind: Expression
  59. type {
  60. int_type_literal {
  61. }
  62. }
  63. }
  64. }
  65. }
  66. }
  67. }
  68. declarations {
  69. interface {
  70. name {
  71. name: "C"
  72. }
  73. members {
  74. function {
  75. name {
  76. name: "H"
  77. }
  78. param_pattern {
  79. }
  80. return_term {
  81. kind: Expression
  82. type {
  83. identifier {
  84. name: "T"
  85. }
  86. }
  87. }
  88. }
  89. }
  90. }
  91. }
  92. declarations {
  93. impl {
  94. kind: ExternalImpl
  95. impl_type {
  96. int_type_literal {
  97. }
  98. }
  99. interface {
  100. identifier {
  101. name: "A"
  102. }
  103. }
  104. members {
  105. function {
  106. name {
  107. name: "F"
  108. }
  109. param_pattern {
  110. }
  111. return_term {
  112. kind: Expression
  113. type {
  114. int_type_literal {
  115. }
  116. }
  117. }
  118. body {
  119. statements {
  120. return_expression_statement {
  121. expression {
  122. int_literal {
  123. value: 1
  124. }
  125. }
  126. }
  127. }
  128. }
  129. }
  130. }
  131. }
  132. }
  133. declarations {
  134. impl {
  135. kind: ExternalImpl
  136. impl_type {
  137. int_type_literal {
  138. }
  139. }
  140. interface {
  141. where {
  142. base {
  143. operator {
  144. op: BitwiseAnd
  145. arguments {
  146. identifier {
  147. name: "B"
  148. }
  149. }
  150. arguments {
  151. call {
  152. function {
  153. identifier {
  154. name: "C"
  155. }
  156. }
  157. argument {
  158. tuple_literal {
  159. fields {
  160. int_type_literal {
  161. }
  162. }
  163. }
  164. }
  165. }
  166. }
  167. }
  168. }
  169. clauses {
  170. impls {
  171. type {
  172. designator {
  173. name: "Self"
  174. }
  175. }
  176. constraint {
  177. identifier {
  178. name: "A"
  179. }
  180. }
  181. }
  182. }
  183. }
  184. }
  185. members {
  186. function {
  187. name {
  188. name: "F"
  189. }
  190. param_pattern {
  191. }
  192. return_term {
  193. kind: Expression
  194. type {
  195. int_type_literal {
  196. }
  197. }
  198. }
  199. body {
  200. statements {
  201. return_expression_statement {
  202. expression {
  203. int_literal {
  204. value: 2
  205. }
  206. }
  207. }
  208. }
  209. }
  210. }
  211. }
  212. members {
  213. function {
  214. name {
  215. name: "G"
  216. }
  217. param_pattern {
  218. }
  219. return_term {
  220. kind: Expression
  221. type {
  222. int_type_literal {
  223. }
  224. }
  225. }
  226. body {
  227. statements {
  228. return_expression_statement {
  229. expression {
  230. int_literal {
  231. value: 3
  232. }
  233. }
  234. }
  235. }
  236. }
  237. }
  238. }
  239. members {
  240. function {
  241. name {
  242. name: "H"
  243. }
  244. param_pattern {
  245. }
  246. return_term {
  247. kind: Expression
  248. type {
  249. int_type_literal {
  250. }
  251. }
  252. }
  253. body {
  254. statements {
  255. return_expression_statement {
  256. expression {
  257. int_literal {
  258. value: 4
  259. }
  260. }
  261. }
  262. }
  263. }
  264. }
  265. }
  266. }
  267. }
  268. declarations {
  269. function {
  270. name {
  271. name: "Main"
  272. }
  273. param_pattern {
  274. }
  275. return_term {
  276. kind: Expression
  277. type {
  278. int_type_literal {
  279. }
  280. }
  281. }
  282. body {
  283. statements {
  284. variable_definition {
  285. pattern {
  286. binding_pattern {
  287. name: "n"
  288. type {
  289. expression_pattern {
  290. expression {
  291. int_type_literal {
  292. }
  293. }
  294. }
  295. }
  296. }
  297. }
  298. init {
  299. int_literal {
  300. value: 0
  301. }
  302. }
  303. is_returned: false
  304. }
  305. }
  306. statements {
  307. return_expression_statement {
  308. expression {
  309. operator {
  310. op: Add
  311. arguments {
  312. operator {
  313. op: Add
  314. arguments {
  315. operator {
  316. op: Add
  317. arguments {
  318. operator {
  319. op: Mul
  320. arguments {
  321. call {
  322. function {
  323. compound_member_access {
  324. object {
  325. identifier {
  326. name: "n"
  327. }
  328. }
  329. path {
  330. simple_member_access {
  331. field: "F"
  332. object {
  333. identifier {
  334. name: "A"
  335. }
  336. }
  337. }
  338. }
  339. }
  340. }
  341. argument {
  342. tuple_literal {
  343. }
  344. }
  345. }
  346. }
  347. arguments {
  348. int_literal {
  349. value: 1000
  350. }
  351. }
  352. }
  353. }
  354. arguments {
  355. operator {
  356. op: Mul
  357. arguments {
  358. call {
  359. function {
  360. compound_member_access {
  361. object {
  362. identifier {
  363. name: "n"
  364. }
  365. }
  366. path {
  367. simple_member_access {
  368. field: "F"
  369. object {
  370. identifier {
  371. name: "B"
  372. }
  373. }
  374. }
  375. }
  376. }
  377. }
  378. argument {
  379. tuple_literal {
  380. }
  381. }
  382. }
  383. }
  384. arguments {
  385. int_literal {
  386. value: 100
  387. }
  388. }
  389. }
  390. }
  391. }
  392. }
  393. arguments {
  394. operator {
  395. op: Mul
  396. arguments {
  397. call {
  398. function {
  399. compound_member_access {
  400. object {
  401. identifier {
  402. name: "n"
  403. }
  404. }
  405. path {
  406. simple_member_access {
  407. field: "G"
  408. object {
  409. identifier {
  410. name: "B"
  411. }
  412. }
  413. }
  414. }
  415. }
  416. }
  417. argument {
  418. tuple_literal {
  419. }
  420. }
  421. }
  422. }
  423. arguments {
  424. int_literal {
  425. value: 10
  426. }
  427. }
  428. }
  429. }
  430. }
  431. }
  432. arguments {
  433. call {
  434. function {
  435. compound_member_access {
  436. object {
  437. identifier {
  438. name: "n"
  439. }
  440. }
  441. path {
  442. simple_member_access {
  443. field: "H"
  444. object {
  445. call {
  446. function {
  447. identifier {
  448. name: "C"
  449. }
  450. }
  451. argument {
  452. tuple_literal {
  453. fields {
  454. int_type_literal {
  455. }
  456. }
  457. }
  458. }
  459. }
  460. }
  461. }
  462. }
  463. }
  464. }
  465. argument {
  466. tuple_literal {
  467. }
  468. }
  469. }
  470. }
  471. }
  472. }
  473. }
  474. }
  475. }
  476. }
  477. }
  478. }