{ "kind" : "Program", "location" : [ 1, 1, 5, 11 ], "declarations" : [ { "kind" : "FuncDef", "location" : [ 1, 1, 3, 11 ], "name" : { "kind" : "Identifier", "location" : [ 1, 5, 1, 5 ], "name" : "f" }, "params" : [ ], "returnType" : { "kind" : "ClassType", "location" : [ 1, 12, 1, 14 ], "className" : "int" }, "declarations" : [ { "kind" : "VarDef", "location" : [ 2, 3, 2, 11 ], "var" : { "kind" : "TypedVar", "location" : [ 2, 3, 2, 7 ], "identifier" : { "kind" : "Identifier", "location" : [ 2, 3, 2, 3 ], "name" : "x" }, "type" : { "kind" : "ClassType", "location" : [ 2, 5, 2, 7 ], "className" : "int" } }, "value" : { "kind" : "IntegerLiteral", "location" : [ 2, 11, 2, 11 ], "inferredType" : { "kind" : "ClassValueType", "className" : "int" }, "value" : 1 } } ], "statements" : [ { "kind" : "ReturnStmt", "location" : [ 3, 3, 3, 10 ], "value" : { "kind" : "Identifier", "location" : [ 3, 10, 3, 10 ], "inferredType" : { "kind" : "ClassValueType", "className" : "int" }, "name" : "x" } } ] } ], "statements" : [ { "kind" : "ExprStmt", "location" : [ 5, 1, 5, 10 ], "expr" : { "kind" : "CallExpr", "location" : [ 5, 1, 5, 10 ], "inferredType" : { "kind" : "ClassValueType", "className" : "" }, "function" : { "kind" : "Identifier", "location" : [ 5, 1, 5, 5 ], "inferredType" : { "kind" : "FuncType", "parameters" : [ { "kind" : "ClassValueType", "className" : "object" } ], "returnType" : { "kind" : "ClassValueType", "className" : "" } }, "name" : "print" }, "args" : [ { "kind" : "CallExpr", "location" : [ 5, 7, 5, 9 ], "inferredType" : { "kind" : "ClassValueType", "className" : "int" }, "function" : { "kind" : "Identifier", "location" : [ 5, 7, 5, 7 ], "inferredType" : { "kind" : "FuncType", "parameters" : [ ], "returnType" : { "kind" : "ClassValueType", "className" : "int" } }, "name" : "f" }, "args" : [ ] } ] } } ], "errors" : { "errors" : [ ], "kind" : "Errors", "location" : [ 0, 0, 0, 0 ] } }