You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ChocoPy/pa3-tests/core/stmt_return_early.py.ast.typed

113 lines
2.7 KiB

{
"kind" : "Program",
"location" : [ 1, 1, 6, 11 ],
"declarations" : [ {
"kind" : "FuncDef",
"location" : [ 1, 1, 4, 13 ],
"name" : {
"kind" : "Identifier",
"location" : [ 1, 5, 1, 5 ],
"name" : "f"
},
"params" : [ ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 1, 12, 1, 14 ],
"className" : "int"
},
"declarations" : [ ],
"statements" : [ {
"kind" : "WhileStmt",
"location" : [ 2, 5, 4, 4 ],
"condition" : {
"kind" : "BooleanLiteral",
"location" : [ 2, 11, 2, 14 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "bool"
},
"value" : true
},
"body" : [ {
"kind" : "ReturnStmt",
"location" : [ 3, 9, 3, 16 ],
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 3, 16, 3, 16 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "int"
},
"value" : 1
}
} ]
}, {
"kind" : "ReturnStmt",
"location" : [ 4, 5, 4, 12 ],
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 4, 12, 4, 12 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "int"
},
"value" : 0
}
} ]
} ],
"statements" : [ {
"kind" : "ExprStmt",
"location" : [ 6, 1, 6, 10 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 6, 1, 6, 10 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "<None>"
},
"function" : {
"kind" : "Identifier",
"location" : [ 6, 1, 6, 5 ],
"inferredType" : {
"kind" : "FuncType",
"parameters" : [ {
"kind" : "ClassValueType",
"className" : "object"
} ],
"returnType" : {
"kind" : "ClassValueType",
"className" : "<None>"
}
},
"name" : "print"
},
"args" : [ {
"kind" : "CallExpr",
"location" : [ 6, 7, 6, 9 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "int"
},
"function" : {
"kind" : "Identifier",
"location" : [ 6, 7, 6, 7 ],
"inferredType" : {
"kind" : "FuncType",
"parameters" : [ ],
"returnType" : {
"kind" : "ClassValueType",
"className" : "int"
}
},
"name" : "f"
},
"args" : [ ]
} ]
}
} ],
"errors" : {
"errors" : [ ],
"kind" : "Errors",
"location" : [ 0, 0, 0, 0 ]
}
}