5269bae96f6771c6ae4ba67e36b7f66fda42daea 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. compilation_unit {
  2. package_statement {
  3. package_name: "Foo"
  4. }
  5. is_api: true
  6. declarations {
  7. function {
  8. name: "F"
  9. self_pattern {
  10. binding_pattern {
  11. name: "self"
  12. type {
  13. expression_pattern {
  14. expression {
  15. int_type_literal {
  16. }
  17. }
  18. }
  19. }
  20. }
  21. }
  22. param_pattern {
  23. }
  24. return_term {
  25. kind: Omitted
  26. }
  27. body {
  28. }
  29. }
  30. }
  31. declarations {
  32. function {
  33. name: "Main"
  34. param_pattern {
  35. }
  36. return_term {
  37. kind: Expression
  38. type {
  39. int_type_literal {
  40. }
  41. }
  42. }
  43. body {
  44. statements {
  45. expression_statement {
  46. expression {
  47. call {
  48. function {
  49. compound_member_access {
  50. object {
  51. int_literal {
  52. value: 42
  53. }
  54. }
  55. path {
  56. identifier {
  57. name: "F"
  58. }
  59. }
  60. }
  61. }
  62. argument {
  63. tuple_literal {
  64. }
  65. }
  66. }
  67. }
  68. }
  69. }
  70. statements {
  71. return_expression_statement {
  72. expression {
  73. int_literal {
  74. value: 0
  75. }
  76. }
  77. }
  78. }
  79. }
  80. }
  81. }
  82. }