70c1ffb0e5928af3588ad282ca66e09cecea781f 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. compilation_unit {
  2. package_statement {
  3. package_name: "ExplorerTest"
  4. }
  5. is_api: true
  6. declarations {
  7. function {
  8. name {
  9. name: "Main"
  10. }
  11. param_pattern {
  12. }
  13. return_term {
  14. kind: Expression
  15. type {
  16. int_type_literal {
  17. }
  18. }
  19. }
  20. body {
  21. statements {
  22. expression_statement {
  23. expression {
  24. call {
  25. function {
  26. identifier {
  27. name: "Print"
  28. }
  29. }
  30. argument {
  31. tuple_literal {
  32. fields {
  33. string_literal {
  34. value: "different types equal: {0}"
  35. }
  36. }
  37. fields {
  38. if_expression {
  39. condition {
  40. operator {
  41. op: Eq
  42. arguments {
  43. int_literal {
  44. value: 1
  45. }
  46. }
  47. arguments {
  48. string_literal {
  49. value: "1"
  50. }
  51. }
  52. }
  53. }
  54. then_expression {
  55. int_literal {
  56. value: 1
  57. }
  58. }
  59. else_expression {
  60. int_literal {
  61. value: 0
  62. }
  63. }
  64. }
  65. }
  66. }
  67. }
  68. }
  69. }
  70. }
  71. }
  72. statements {
  73. return_expression_statement {
  74. expression {
  75. int_literal {
  76. value: 0
  77. }
  78. }
  79. }
  80. }
  81. }
  82. }
  83. }
  84. }