0542a56192cecd529b82ed2081aa5459863f359e 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. compilation_unit {
  2. package_statement {
  3. package_name: "ExplorerTest"
  4. }
  5. is_api: true
  6. declarations {
  7. class_declaration {
  8. name {
  9. name: "A"
  10. }
  11. members {
  12. variable {
  13. binding {
  14. name: "n"
  15. type {
  16. expression_pattern {
  17. expression {
  18. int_type_literal {
  19. }
  20. }
  21. }
  22. }
  23. }
  24. }
  25. }
  26. }
  27. }
  28. declarations {
  29. function {
  30. name {
  31. name: "Main"
  32. }
  33. param_pattern {
  34. }
  35. return_term {
  36. kind: Expression
  37. type {
  38. int_type_literal {
  39. }
  40. }
  41. }
  42. body {
  43. statements {
  44. variable_definition {
  45. pattern {
  46. binding_pattern {
  47. name: "a"
  48. type {
  49. expression_pattern {
  50. expression {
  51. identifier {
  52. name: "A"
  53. }
  54. }
  55. }
  56. }
  57. }
  58. }
  59. init {
  60. struct_literal {
  61. fields {
  62. name: "n"
  63. expression {
  64. int_literal {
  65. value: 5
  66. }
  67. }
  68. }
  69. }
  70. }
  71. is_returned: false
  72. }
  73. }
  74. statements {
  75. return_expression_statement {
  76. expression {
  77. operator {
  78. op: As
  79. arguments {
  80. identifier {
  81. name: "a"
  82. }
  83. }
  84. arguments {
  85. int_type_literal {
  86. }
  87. }
  88. }
  89. }
  90. }
  91. }
  92. }
  93. }
  94. }
  95. }