db160c03d69c93b692d6f4e2ef1c15f0bcdb7f8f 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852
  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: "Which"
  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: "X"
  33. }
  34. }
  35. }
  36. declarations {
  37. interface {
  38. name {
  39. name: "Y"
  40. }
  41. }
  42. }
  43. declarations {
  44. interface {
  45. name {
  46. name: "Z"
  47. }
  48. }
  49. }
  50. declarations {
  51. match_first {
  52. impls {
  53. impl {
  54. kind: ExternalImpl
  55. impl_type {
  56. identifier {
  57. name: "T"
  58. }
  59. }
  60. interface {
  61. identifier {
  62. name: "A"
  63. }
  64. }
  65. members {
  66. function {
  67. name {
  68. name: "Which"
  69. }
  70. param_pattern {
  71. }
  72. return_term {
  73. kind: Expression
  74. type {
  75. int_type_literal {
  76. }
  77. }
  78. }
  79. body {
  80. statements {
  81. return_expression_statement {
  82. expression {
  83. int_literal {
  84. value: 1
  85. }
  86. }
  87. }
  88. }
  89. }
  90. }
  91. }
  92. }
  93. }
  94. impls {
  95. impl {
  96. kind: ExternalImpl
  97. impl_type {
  98. identifier {
  99. name: "T"
  100. }
  101. }
  102. interface {
  103. identifier {
  104. name: "A"
  105. }
  106. }
  107. members {
  108. function {
  109. name {
  110. name: "Which"
  111. }
  112. param_pattern {
  113. }
  114. return_term {
  115. kind: Expression
  116. type {
  117. int_type_literal {
  118. }
  119. }
  120. }
  121. body {
  122. statements {
  123. return_expression_statement {
  124. expression {
  125. int_literal {
  126. value: 2
  127. }
  128. }
  129. }
  130. }
  131. }
  132. }
  133. }
  134. }
  135. }
  136. impls {
  137. impl {
  138. kind: ExternalImpl
  139. impl_type {
  140. identifier {
  141. name: "T"
  142. }
  143. }
  144. interface {
  145. identifier {
  146. name: "A"
  147. }
  148. }
  149. members {
  150. function {
  151. name {
  152. name: "Which"
  153. }
  154. param_pattern {
  155. }
  156. return_term {
  157. kind: Expression
  158. type {
  159. int_type_literal {
  160. }
  161. }
  162. }
  163. body {
  164. statements {
  165. return_expression_statement {
  166. expression {
  167. int_literal {
  168. value: 3
  169. }
  170. }
  171. }
  172. }
  173. }
  174. }
  175. }
  176. }
  177. }
  178. impls {
  179. impl {
  180. kind: ExternalImpl
  181. impl_type {
  182. identifier {
  183. name: "T"
  184. }
  185. }
  186. interface {
  187. identifier {
  188. name: "A"
  189. }
  190. }
  191. members {
  192. function {
  193. name {
  194. name: "Which"
  195. }
  196. param_pattern {
  197. }
  198. return_term {
  199. kind: Expression
  200. type {
  201. int_type_literal {
  202. }
  203. }
  204. }
  205. body {
  206. statements {
  207. return_expression_statement {
  208. expression {
  209. int_literal {
  210. value: 4
  211. }
  212. }
  213. }
  214. }
  215. }
  216. }
  217. }
  218. }
  219. }
  220. }
  221. }
  222. declarations {
  223. class_declaration {
  224. name {
  225. name: "XYZ"
  226. }
  227. }
  228. }
  229. declarations {
  230. class_declaration {
  231. name {
  232. name: "XY"
  233. }
  234. }
  235. }
  236. declarations {
  237. class_declaration {
  238. name {
  239. name: "XZ"
  240. }
  241. }
  242. }
  243. declarations {
  244. class_declaration {
  245. name {
  246. name: "YZ"
  247. }
  248. }
  249. }
  250. declarations {
  251. class_declaration {
  252. name {
  253. name: "JustX"
  254. }
  255. }
  256. }
  257. declarations {
  258. class_declaration {
  259. name {
  260. name: "JustY"
  261. }
  262. }
  263. }
  264. declarations {
  265. class_declaration {
  266. name {
  267. name: "JustZ"
  268. }
  269. }
  270. }
  271. declarations {
  272. class_declaration {
  273. name {
  274. name: "None"
  275. }
  276. }
  277. }
  278. declarations {
  279. impl {
  280. kind: InternalImpl
  281. impl_type {
  282. identifier {
  283. name: "XYZ"
  284. }
  285. }
  286. interface {
  287. operator {
  288. op: BitwiseAnd
  289. arguments {
  290. operator {
  291. op: BitwiseAnd
  292. arguments {
  293. identifier {
  294. name: "X"
  295. }
  296. }
  297. arguments {
  298. identifier {
  299. name: "Y"
  300. }
  301. }
  302. }
  303. }
  304. arguments {
  305. identifier {
  306. name: "Z"
  307. }
  308. }
  309. }
  310. }
  311. }
  312. }
  313. declarations {
  314. impl {
  315. kind: InternalImpl
  316. impl_type {
  317. identifier {
  318. name: "XY"
  319. }
  320. }
  321. interface {
  322. operator {
  323. op: BitwiseAnd
  324. arguments {
  325. identifier {
  326. name: "X"
  327. }
  328. }
  329. arguments {
  330. identifier {
  331. name: "Y"
  332. }
  333. }
  334. }
  335. }
  336. }
  337. }
  338. declarations {
  339. impl {
  340. kind: InternalImpl
  341. impl_type {
  342. identifier {
  343. name: "XZ"
  344. }
  345. }
  346. interface {
  347. operator {
  348. op: BitwiseAnd
  349. arguments {
  350. identifier {
  351. name: "X"
  352. }
  353. }
  354. arguments {
  355. identifier {
  356. name: "Z"
  357. }
  358. }
  359. }
  360. }
  361. }
  362. }
  363. declarations {
  364. impl {
  365. kind: InternalImpl
  366. impl_type {
  367. identifier {
  368. name: "YZ"
  369. }
  370. }
  371. interface {
  372. operator {
  373. op: BitwiseAnd
  374. arguments {
  375. identifier {
  376. name: "Y"
  377. }
  378. }
  379. arguments {
  380. identifier {
  381. name: "Z"
  382. }
  383. }
  384. }
  385. }
  386. }
  387. }
  388. declarations {
  389. impl {
  390. kind: InternalImpl
  391. impl_type {
  392. identifier {
  393. name: "JustX"
  394. }
  395. }
  396. interface {
  397. identifier {
  398. name: "X"
  399. }
  400. }
  401. }
  402. }
  403. declarations {
  404. impl {
  405. kind: InternalImpl
  406. impl_type {
  407. identifier {
  408. name: "JustY"
  409. }
  410. }
  411. interface {
  412. identifier {
  413. name: "Y"
  414. }
  415. }
  416. }
  417. }
  418. declarations {
  419. impl {
  420. kind: InternalImpl
  421. impl_type {
  422. identifier {
  423. name: "JustZ"
  424. }
  425. }
  426. interface {
  427. identifier {
  428. name: "Z"
  429. }
  430. }
  431. }
  432. }
  433. declarations {
  434. function {
  435. name {
  436. name: "Main"
  437. }
  438. param_pattern {
  439. }
  440. return_term {
  441. kind: Expression
  442. type {
  443. int_type_literal {
  444. }
  445. }
  446. }
  447. body {
  448. statements {
  449. expression_statement {
  450. expression {
  451. call {
  452. function {
  453. identifier {
  454. name: "Print"
  455. }
  456. }
  457. argument {
  458. tuple_literal {
  459. fields {
  460. string_literal {
  461. value: "XYZ: {0}"
  462. }
  463. }
  464. fields {
  465. call {
  466. function {
  467. compound_member_access {
  468. object {
  469. identifier {
  470. name: "XYZ"
  471. }
  472. }
  473. path {
  474. simple_member_access {
  475. field: "Which"
  476. object {
  477. identifier {
  478. name: "A"
  479. }
  480. }
  481. }
  482. }
  483. }
  484. }
  485. argument {
  486. tuple_literal {
  487. }
  488. }
  489. }
  490. }
  491. }
  492. }
  493. }
  494. }
  495. }
  496. }
  497. statements {
  498. expression_statement {
  499. expression {
  500. call {
  501. function {
  502. identifier {
  503. name: "Print"
  504. }
  505. }
  506. argument {
  507. tuple_literal {
  508. fields {
  509. string_literal {
  510. value: "XY: {0}"
  511. }
  512. }
  513. fields {
  514. call {
  515. function {
  516. compound_member_access {
  517. object {
  518. identifier {
  519. name: "XY"
  520. }
  521. }
  522. path {
  523. simple_member_access {
  524. field: "Which"
  525. object {
  526. identifier {
  527. name: "A"
  528. }
  529. }
  530. }
  531. }
  532. }
  533. }
  534. argument {
  535. tuple_literal {
  536. }
  537. }
  538. }
  539. }
  540. }
  541. }
  542. }
  543. }
  544. }
  545. }
  546. statements {
  547. expression_statement {
  548. expression {
  549. call {
  550. function {
  551. identifier {
  552. name: "Print"
  553. }
  554. }
  555. argument {
  556. tuple_literal {
  557. fields {
  558. string_literal {
  559. value: "XZ: {0}"
  560. }
  561. }
  562. fields {
  563. call {
  564. function {
  565. compound_member_access {
  566. object {
  567. identifier {
  568. name: "XZ"
  569. }
  570. }
  571. path {
  572. simple_member_access {
  573. field: "Which"
  574. object {
  575. identifier {
  576. name: "A"
  577. }
  578. }
  579. }
  580. }
  581. }
  582. }
  583. argument {
  584. tuple_literal {
  585. }
  586. }
  587. }
  588. }
  589. }
  590. }
  591. }
  592. }
  593. }
  594. }
  595. statements {
  596. expression_statement {
  597. expression {
  598. call {
  599. function {
  600. identifier {
  601. name: "Print"
  602. }
  603. }
  604. argument {
  605. tuple_literal {
  606. fields {
  607. string_literal {
  608. value: "YZ: {0}"
  609. }
  610. }
  611. fields {
  612. call {
  613. function {
  614. compound_member_access {
  615. object {
  616. identifier {
  617. name: "YZ"
  618. }
  619. }
  620. path {
  621. simple_member_access {
  622. field: "Which"
  623. object {
  624. identifier {
  625. name: "A"
  626. }
  627. }
  628. }
  629. }
  630. }
  631. }
  632. argument {
  633. tuple_literal {
  634. }
  635. }
  636. }
  637. }
  638. }
  639. }
  640. }
  641. }
  642. }
  643. }
  644. statements {
  645. expression_statement {
  646. expression {
  647. call {
  648. function {
  649. identifier {
  650. name: "Print"
  651. }
  652. }
  653. argument {
  654. tuple_literal {
  655. fields {
  656. string_literal {
  657. value: "JustX: {0}"
  658. }
  659. }
  660. fields {
  661. call {
  662. function {
  663. compound_member_access {
  664. object {
  665. identifier {
  666. name: "JustX"
  667. }
  668. }
  669. path {
  670. simple_member_access {
  671. field: "Which"
  672. object {
  673. identifier {
  674. name: "A"
  675. }
  676. }
  677. }
  678. }
  679. }
  680. }
  681. argument {
  682. tuple_literal {
  683. }
  684. }
  685. }
  686. }
  687. }
  688. }
  689. }
  690. }
  691. }
  692. }
  693. statements {
  694. expression_statement {
  695. expression {
  696. call {
  697. function {
  698. identifier {
  699. name: "Print"
  700. }
  701. }
  702. argument {
  703. tuple_literal {
  704. fields {
  705. string_literal {
  706. value: "JustY: {0}"
  707. }
  708. }
  709. fields {
  710. call {
  711. function {
  712. compound_member_access {
  713. object {
  714. identifier {
  715. name: "JustY"
  716. }
  717. }
  718. path {
  719. simple_member_access {
  720. field: "Which"
  721. object {
  722. identifier {
  723. name: "A"
  724. }
  725. }
  726. }
  727. }
  728. }
  729. }
  730. argument {
  731. tuple_literal {
  732. }
  733. }
  734. }
  735. }
  736. }
  737. }
  738. }
  739. }
  740. }
  741. }
  742. statements {
  743. expression_statement {
  744. expression {
  745. call {
  746. function {
  747. identifier {
  748. name: "Print"
  749. }
  750. }
  751. argument {
  752. tuple_literal {
  753. fields {
  754. string_literal {
  755. value: "JustZ: {0}"
  756. }
  757. }
  758. fields {
  759. call {
  760. function {
  761. compound_member_access {
  762. object {
  763. identifier {
  764. name: "JustZ"
  765. }
  766. }
  767. path {
  768. simple_member_access {
  769. field: "Which"
  770. object {
  771. identifier {
  772. name: "A"
  773. }
  774. }
  775. }
  776. }
  777. }
  778. }
  779. argument {
  780. tuple_literal {
  781. }
  782. }
  783. }
  784. }
  785. }
  786. }
  787. }
  788. }
  789. }
  790. }
  791. statements {
  792. expression_statement {
  793. expression {
  794. call {
  795. function {
  796. identifier {
  797. name: "Print"
  798. }
  799. }
  800. argument {
  801. tuple_literal {
  802. fields {
  803. string_literal {
  804. value: "None: {0}"
  805. }
  806. }
  807. fields {
  808. call {
  809. function {
  810. compound_member_access {
  811. object {
  812. identifier {
  813. name: "None"
  814. }
  815. }
  816. path {
  817. simple_member_access {
  818. field: "Which"
  819. object {
  820. identifier {
  821. name: "A"
  822. }
  823. }
  824. }
  825. }
  826. }
  827. }
  828. argument {
  829. tuple_literal {
  830. }
  831. }
  832. }
  833. }
  834. }
  835. }
  836. }
  837. }
  838. }
  839. }
  840. statements {
  841. return_expression_statement {
  842. expression {
  843. int_literal {
  844. value: 0
  845. }
  846. }
  847. }
  848. }
  849. }
  850. }
  851. }
  852. }