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/pa2-tests/core/stmt_list_assign.py.ast

155 lines
3.5 KiB

{
"kind" : "Program",
"location" : [ 1, 1, 7, 16 ],
"declarations" : [ {
"kind" : "VarDef",
"location" : [ 1, 1, 1, 14 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 1, 1, 1, 7 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 1, 1, 1, 1 ],
"name" : "x"
},
"type" : {
"kind" : "ListType",
"location" : [ 1, 3, 1, 7 ],
"elementType" : {
"kind" : "ClassType",
"location" : [ 1, 4, 1, 6 ],
"className" : "int"
}
}
},
"value" : {
"kind" : "NoneLiteral",
"location" : [ 1, 11, 1, 14 ]
}
}, {
"kind" : "VarDef",
"location" : [ 2, 1, 2, 17 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 2, 1, 2, 10 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 2, 1, 2, 1 ],
"name" : "y"
},
"type" : {
"kind" : "ListType",
"location" : [ 2, 3, 2, 10 ],
"elementType" : {
"kind" : "ClassType",
"location" : [ 2, 4, 2, 9 ],
"className" : "object"
}
}
},
"value" : {
"kind" : "NoneLiteral",
"location" : [ 2, 14, 2, 17 ]
}
} ],
"statements" : [ {
"kind" : "AssignStmt",
"location" : [ 4, 1, 4, 10 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 4, 1, 4, 1 ],
"name" : "x"
} ],
"value" : {
"kind" : "ListExpr",
"location" : [ 4, 5, 4, 10 ],
"elements" : [ {
"kind" : "IntegerLiteral",
"location" : [ 4, 6, 4, 6 ],
"value" : 1
}, {
"kind" : "IntegerLiteral",
"location" : [ 4, 9, 4, 9 ],
"value" : 2
} ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 5, 1, 5, 10 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 5, 1, 5, 1 ],
"name" : "y"
} ],
"value" : {
"kind" : "ListExpr",
"location" : [ 5, 5, 5, 10 ],
"elements" : [ {
"kind" : "NoneLiteral",
"location" : [ 5, 6, 5, 9 ]
} ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 6, 1, 6, 8 ],
"targets" : [ {
"kind" : "IndexExpr",
"location" : [ 6, 1, 6, 4 ],
"list" : {
"kind" : "Identifier",
"location" : [ 6, 1, 6, 1 ],
"name" : "x"
},
"index" : {
"kind" : "IntegerLiteral",
"location" : [ 6, 3, 6, 3 ],
"value" : 0
}
} ],
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 6, 8, 6, 8 ],
"value" : 3
}
}, {
"kind" : "AssignStmt",
"location" : [ 7, 1, 7, 15 ],
"targets" : [ {
"kind" : "IndexExpr",
"location" : [ 7, 1, 7, 4 ],
"list" : {
"kind" : "Identifier",
"location" : [ 7, 1, 7, 1 ],
"name" : "x"
},
"index" : {
"kind" : "IntegerLiteral",
"location" : [ 7, 3, 7, 3 ],
"value" : 1
}
}, {
"kind" : "IndexExpr",
"location" : [ 7, 8, 7, 11 ],
"list" : {
"kind" : "Identifier",
"location" : [ 7, 8, 7, 8 ],
"name" : "y"
},
"index" : {
"kind" : "IntegerLiteral",
"location" : [ 7, 10, 7, 10 ],
"value" : 0
}
} ],
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 7, 15, 7, 15 ],
"value" : 4
}
} ],
"errors" : {
"errors" : [ ],
"kind" : "Errors",
"location" : [ 0, 0, 0, 0 ]
}
}