5dd9c62b5221d7a85e9e1b4a4b331be2c339ab97 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. variable_definition {
  23. pattern {
  24. binding_pattern {
  25. name: "n"
  26. type {
  27. expression_pattern {
  28. expression {
  29. int_type_literal {
  30. }
  31. }
  32. }
  33. }
  34. }
  35. }
  36. init {
  37. int_literal {
  38. value: 5
  39. }
  40. }
  41. is_returned: false
  42. }
  43. }
  44. statements {
  45. return_expression_statement {
  46. expression {
  47. operator {
  48. op: As
  49. arguments {
  50. identifier {
  51. name: "n"
  52. }
  53. }
  54. arguments {
  55. int_type_literal {
  56. }
  57. }
  58. }
  59. }
  60. }
  61. }
  62. }
  63. }
  64. }
  65. }