{ "type": "Program", "statements": [ { "FunctionStatement": { "type": "FunctionStatement", "name": { "type": "IdentifierLiteral", "value": "add" }, "return_type": "Int", "parameters": [ { "type": "FunctionParameter", "name": "a", "value_type": "Int" }, { "type": "FunctionParameter", "name": "b", "value_type": "Int" } ], "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "return_value": { "type": "InfixExpression", "left_node": { "type": "IdentifierLiteral", "value": "a" }, "operator": "+", "right_node": { "type": "IdentifierLiteral", "value": "b" } } } ] } } }, { "FunctionStatement": { "type": "FunctionStatement", "name": { "type": "IdentifierLiteral", "value": "main" }, "return_type": "Int", "parameters": [], "body": { "type": "BlockStatement", "statements": [ { "type": "ExpressionStatement", "expr": { "type": "CallExpression", "function": { "type": "IdentifierLiteral", "value": "print" }, "arguments": [ { "type": "StringLiteral", "value": "apples %i" }, { "type": "CallExpression", "function": { "type": "IdentifierLiteral", "value": "add" }, "arguments": [ { "type": "IntegerLiteral", "value": 1 }, { "type": "IntegerLiteral", "value": 2 } ] } ] } }, { "type": "ReturnStatement", "return_value": { "type": "IntegerLiteral", "value": 0 } } ] } } } ] }