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/pa1-tests/core/class_attr_set.py.ast

87 lines
1.9 KiB

{
"kind" : "Program",
"location" : [ 1, 1, 5, 8 ],
"declarations" : [ {
"kind" : "ClassDef",
"location" : [ 1, 1, 2, 14 ],
"name" : {
"kind" : "Identifier",
"location" : [ 1, 7, 1, 9 ],
"name" : "Foo"
},
"superClass" : {
"kind" : "Identifier",
"location" : [ 1, 11, 1, 16 ],
"name" : "object"
},
"declarations" : [ {
"kind" : "VarDef",
"location" : [ 2, 5, 2, 13 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 2, 5, 2, 9 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 2, 5, 2, 5 ],
"name" : "x"
},
"type" : {
"kind" : "ClassType",
"location" : [ 2, 7, 2, 9 ],
"className" : "int"
}
},
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 2, 13, 2, 13 ],
"value" : 1
}
} ]
} ],
"statements" : [ {
"kind" : "AssignStmt",
"location" : [ 4, 1, 4, 9 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 4, 1, 4, 1 ],
"name" : "f"
} ],
"value" : {
"kind" : "CallExpr",
"location" : [ 4, 5, 4, 9 ],
"function" : {
"kind" : "Identifier",
"location" : [ 4, 5, 4, 7 ],
"name" : "Foo"
},
"args" : [ ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 5, 1, 5, 7 ],
"targets" : [ {
"kind" : "MemberExpr",
"location" : [ 5, 1, 5, 3 ],
"object" : {
"kind" : "Identifier",
"location" : [ 5, 1, 5, 1 ],
"name" : "f"
},
"member" : {
"kind" : "Identifier",
"location" : [ 5, 3, 5, 3 ],
"name" : "x"
}
} ],
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 5, 7, 5, 7 ],
"value" : 2
}
} ],
"errors" : {
"errors" : [ ],
"kind" : "Errors",
"location" : [ 0, 0, 0, 0 ]
}
}