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/var_assign.py.ast.typed

128 lines
2.9 KiB

{
"kind" : "Program",
"location" : [ 1, 1, 4, 9 ],
"declarations" : [ {
"kind" : "VarDef",
"location" : [ 1, 1, 1, 9 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 1, 1, 1, 5 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 1, 1, 1, 1 ],
"name" : "x"
},
"type" : {
"kind" : "ClassType",
"location" : [ 1, 3, 1, 5 ],
"className" : "int"
}
},
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 1, 9, 1, 9 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "int"
},
"value" : 0
}
}, {
"kind" : "VarDef",
"location" : [ 2, 1, 2, 12 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 2, 1, 2, 8 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 2, 1, 2, 1 ],
"name" : "y"
},
"type" : {
"kind" : "ClassType",
"location" : [ 2, 3, 2, 8 ],
"className" : "object"
}
},
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 2, 12, 2, 12 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "int"
},
"value" : 1
}
} ],
"statements" : [ {
"kind" : "AssignStmt",
"location" : [ 3, 1, 3, 10 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 3, 1, 3, 1 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "int"
},
"name" : "x"
}, {
"kind" : "Identifier",
"location" : [ 3, 5, 3, 5 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "object"
},
"name" : "y"
} ],
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 3, 9, 3, 10 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "int"
},
"value" : 42
}
}, {
"kind" : "ExprStmt",
"location" : [ 4, 1, 4, 8 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 4, 1, 4, 8 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "<None>"
},
"function" : {
"kind" : "Identifier",
"location" : [ 4, 1, 4, 5 ],
"inferredType" : {
"kind" : "FuncType",
"parameters" : [ {
"kind" : "ClassValueType",
"className" : "object"
} ],
"returnType" : {
"kind" : "ClassValueType",
"className" : "<None>"
}
},
"name" : "print"
},
"args" : [ {
"kind" : "Identifier",
"location" : [ 4, 7, 4, 7 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "int"
},
"name" : "x"
} ]
}
} ],
"errors" : {
"errors" : [ ],
"kind" : "Errors",
"location" : [ 0, 0, 0, 0 ]
}
}